gcp-nrces-fhir
Advanced tools
Comparing version 9.0.20 to 9.0.21
@@ -108,50 +108,3 @@ import { CODEABLE_CONCEPT, EXTENSION, IDENTTIFIER, MONEY, MULTI_RESOURCE, PERIOD } from "../config"; | ||
coverage: Coverage[]; | ||
plan: { | ||
identifier: { | ||
use: string; | ||
value: string; | ||
}[]; | ||
type: { | ||
coding: { | ||
system: string; | ||
code: string; | ||
display: string; | ||
}[]; | ||
}; | ||
generalCost: { | ||
cost: { | ||
value: number; | ||
currency: string; | ||
}; | ||
}[]; | ||
specificCost: { | ||
category: { | ||
coding: { | ||
system: string; | ||
code: string; | ||
display: string; | ||
}[]; | ||
}; | ||
benefit: { | ||
type: { | ||
coding: { | ||
system: string; | ||
code: string; | ||
display: string; | ||
}[]; | ||
}; | ||
cost: { | ||
type: { | ||
coding: { | ||
code: string; | ||
}[]; | ||
}; | ||
value: { | ||
value: number; | ||
unit: string; | ||
}; | ||
}[]; | ||
}[]; | ||
}[]; | ||
}[]; | ||
plan: Plan[]; | ||
}; | ||
@@ -158,0 +111,0 @@ convertFhirToObject(options: any): INSURANCE_PLAN; |
@@ -56,370 +56,3 @@ "use strict"; | ||
coverage: options.coverage, | ||
plan: [ | ||
{ | ||
identifier: [ | ||
{ | ||
use: "official", | ||
value: "Active Assure Silver", | ||
}, | ||
], | ||
type: { | ||
coding: [ | ||
{ | ||
system: "https://nrces.in/ndhm/fhir/r4/CodeSystem/ndhm-plan-type", | ||
code: "01", | ||
display: "Individual", | ||
}, | ||
], | ||
}, | ||
generalCost: [ | ||
{ | ||
cost: { | ||
value: 200000, | ||
currency: "INR", | ||
}, | ||
}, | ||
], | ||
specificCost: [ | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "49122002", | ||
display: "Ambulance, device (physical object)", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "49122002", | ||
display: "Ambulance, device (physical object)", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 2000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "224663004", | ||
display: "Single room (environment)", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "224663004", | ||
display: "Single room (environment)", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 2000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "309904001", | ||
display: "Intensive care unit (environment)", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "309904001", | ||
display: "Intensive care unit (environment)", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 4000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "60689008", | ||
display: "Home care of patient", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "60689008", | ||
display: "Home care of patient", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 20000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: [ | ||
{ | ||
use: "official", | ||
value: "Active Assure Silver", | ||
}, | ||
], | ||
type: { | ||
coding: [ | ||
{ | ||
system: "https://nrces.in/ndhm/fhir/r4/CodeSystem/ndhm-plan-type", | ||
code: "01", | ||
display: "Individual", | ||
}, | ||
], | ||
}, | ||
generalCost: [ | ||
{ | ||
cost: { | ||
value: 700000, | ||
currency: "INR", | ||
}, | ||
}, | ||
], | ||
specificCost: [ | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "49122002", | ||
display: "Ambulance, device (physical object)", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "49122002", | ||
display: "Ambulance, device (physical object)", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 2000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "224663004", | ||
display: "Single room (environment)", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "224663004", | ||
display: "Single room (environment)", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 7000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "309904001", | ||
display: "Intensive care unit (environment)", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "309904001", | ||
display: "Intensive care unit (environment)", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 14000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
category: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "60689008", | ||
display: "Home care of patient", | ||
}, | ||
], | ||
}, | ||
benefit: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
system: "http://snomed.info/sct", | ||
code: "60689008", | ||
display: "Home care of patient", | ||
}, | ||
], | ||
}, | ||
cost: [ | ||
{ | ||
type: { | ||
coding: [ | ||
{ | ||
code: "fullcoverage", | ||
}, | ||
], | ||
}, | ||
value: { | ||
value: 70000, | ||
unit: "INR", | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
plan: options.plan, | ||
}; | ||
@@ -461,4 +94,46 @@ return body; | ||
toHtml(option) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const getLimit = (limit) => { | ||
const limitRet = limit && | ||
limit.map((el) => { | ||
var _a; | ||
let ret = `<tr><td>${el.code && this.codebleConceptToHtml(el.code)}</td>`; | ||
ret += `<td>${(_a = el.value) === null || _a === void 0 ? void 0 : _a.value}</td></tr>`; | ||
return ret; | ||
}); | ||
let tablest = `<table> | ||
<tr> | ||
<th> | ||
Item | ||
</th> | ||
<th> | ||
Value | ||
</th> | ||
</tr> | ||
${limitRet === null || limitRet === void 0 ? void 0 : limitRet.join("")} | ||
</table> | ||
`; | ||
return tablest; | ||
}; | ||
const getBenfit = (benefit) => { | ||
const benefitRet = benefit.map((el) => { | ||
let ret = `<h4>${el.type && this.codebleConceptToHtml(el.type)}</h4>`; | ||
ret += el.requirement && `<p>${el.requirement}</p>`; | ||
ret += getLimit(el.limit); | ||
return ret; | ||
}); | ||
return benefitRet.join("</br/>"); | ||
}; | ||
const getCoverage = () => { | ||
const coveragedstr = data.coverage && | ||
data.coverage.map((el) => { | ||
let ret = `<h3>${this.codebleConceptToHtml(el.type)}</h3>`; | ||
ret += el.requirement && `<p>${el.requirement}</p>`; | ||
ret += getBenfit(el.benefit); | ||
return ret; | ||
}); | ||
return coveragedstr.join("</br/>"); | ||
}; | ||
const data = option.body; | ||
@@ -476,5 +151,3 @@ return ` | ||
? new Date(data.period.start).toLocaleDateString() | ||
: "N/A"} to ${((_c = data.period) === null || _c === void 0 ? void 0 : _c.end) | ||
? new Date(data.period.end).toLocaleDateString() | ||
: "N/A"}</p> | ||
: "N/A"} to ${((_c = data.period) === null || _c === void 0 ? void 0 : _c.end) ? new Date(data.period.end).toLocaleDateString() : "N/A"}</p> | ||
<p><strong>Owned By:</strong> ${((_d = data.ownedBy) === null || _d === void 0 ? void 0 : _d.display) || "N/A"} (${((_e = data.ownedBy) === null || _e === void 0 ? void 0 : _e.reference) || "N/A"})</p> | ||
@@ -486,3 +159,3 @@ <p><strong>Administered By:</strong> ${((_f = data.administeredBy) === null || _f === void 0 ? void 0 : _f.display) || "N/A"} (${((_g = data.administeredBy) === null || _g === void 0 ? void 0 : _g.reference) || "N/A"})</p> | ||
<ul> | ||
${((_j = data.identifier) === null || _j === void 0 ? void 0 : _j.map(id => ` | ||
${((_j = data.identifier) === null || _j === void 0 ? void 0 : _j.map((id) => ` | ||
<li> | ||
@@ -496,59 +169,3 @@ <strong>System:</strong> ${id.system || "N/A"}, | ||
<h2>Coverage</h2> | ||
<table border="1" cellspacing="0" cellpadding="5"> | ||
<thead> | ||
<tr> | ||
<th>Type</th> | ||
<th>Requirement</th> | ||
<th>Benefits</th> | ||
<th>Networks</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
${((_k = data.coverage) === null || _k === void 0 ? void 0 : _k.map(coverage => { | ||
var _a, _b, _c; | ||
return ` | ||
<tr> | ||
<td>${((_a = coverage.type) === null || _a === void 0 ? void 0 : _a.text) || "N/A"}</td> | ||
<td>${coverage.requirement || "N/A"}</td> | ||
<td> | ||
<ul> | ||
${((_b = coverage.benefit) === null || _b === void 0 ? void 0 : _b.map(benefit => { | ||
var _a, _b; | ||
return ` | ||
<li> | ||
<strong>Type:</strong> ${((_a = benefit.type) === null || _a === void 0 ? void 0 : _a.text) || "N/A"}<br> | ||
<strong>Requirement:</strong> ${benefit.requirement || "N/A"}<br> | ||
<strong>Limits:</strong> | ||
<ul> | ||
${((_b = benefit.limit) === null || _b === void 0 ? void 0 : _b.map(limit => { | ||
var _a, _b, _c; | ||
return ` | ||
<li> | ||
<strong>Value:</strong> ${((_a = limit.value) === null || _a === void 0 ? void 0 : _a.value) || "N/A"} ${((_b = limit.value) === null || _b === void 0 ? void 0 : _b.unit) || ""}<br> | ||
<strong>Code:</strong> ${((_c = limit.code) === null || _c === void 0 ? void 0 : _c.text) || "N/A"} | ||
</li> | ||
`; | ||
}).join("")) || "<li>None</li>"} | ||
</ul> | ||
</li> | ||
`; | ||
}).join("")) || "<li>None</li>"} | ||
</ul> | ||
</td> | ||
<td> | ||
<ul> | ||
${((_c = coverage.network) === null || _c === void 0 ? void 0 : _c.map(network => ` | ||
<li> | ||
<strong>Resource:</strong> ${network.resource || "N/A"}<br> | ||
<strong>Display:</strong> ${network.display || "N/A"} | ||
</li> | ||
`).join("")) || "<li>None</li>"} | ||
</ul> | ||
</td> | ||
</tr> | ||
`; | ||
}).join("")) || "<tr><td colspan='4'>No Coverage Available</td></tr>"} | ||
</tbody> | ||
</table> | ||
${getCoverage()} | ||
<h2>Plans</h2> | ||
@@ -565,3 +182,3 @@ <table border="1" cellspacing="0" cellpadding="5"> | ||
<tbody> | ||
${((_l = data.plan) === null || _l === void 0 ? void 0 : _l.map(plan => { | ||
${((_k = data.plan) === null || _k === void 0 ? void 0 : _k.map((plan) => { | ||
var _a, _b, _c, _d; | ||
@@ -573,3 +190,3 @@ return ` | ||
<ul> | ||
${((_b = plan.coverageArea) === null || _b === void 0 ? void 0 : _b.map(area => ` | ||
${((_b = plan.coverageArea) === null || _b === void 0 ? void 0 : _b.map((area) => ` | ||
<li> | ||
@@ -584,3 +201,3 @@ <strong>Resource:</strong> ${area.resource || "N/A"}<br> | ||
<ul> | ||
${((_c = plan.generalCost) === null || _c === void 0 ? void 0 : _c.map(cost => { | ||
${((_c = plan.generalCost) === null || _c === void 0 ? void 0 : _c.map((cost) => { | ||
var _a, _b, _c; | ||
@@ -600,3 +217,3 @@ return ` | ||
<ul> | ||
${((_d = plan.network) === null || _d === void 0 ? void 0 : _d.map(network => ` | ||
${((_d = plan.network) === null || _d === void 0 ? void 0 : _d.map((network) => ` | ||
<li> | ||
@@ -620,2 +237,49 @@ <strong>Resource:</strong> ${network.resource || "N/A"}<br> | ||
exports.InsurancePlan = InsurancePlan; | ||
// <table border="1" cellspacing="0" cellpadding="5"> | ||
// <thead> | ||
// <tr> | ||
// <th>Type</th> | ||
// <th>Requirement</th> | ||
// <th>Benefits</th> | ||
// <th>Networks</th> | ||
// </tr> | ||
// </thead> | ||
// <tbody> | ||
// ${data.coverage?.map(coverage => ` | ||
// <tr> | ||
// <td>${ coverage.type && this.codebleConceptToHtml(coverage.type) || "N/A"}</td> | ||
// <td>${coverage.requirement || "N/A"}</td> | ||
// <td> | ||
// <ul> | ||
// ${coverage.benefit?.map(benefit => ` | ||
// <li> | ||
// <strong>Type:</strong> ${benefit.type?.text || "N/A"}<br> | ||
// <strong>Requirement:</strong> ${benefit.requirement || "N/A"}<br> | ||
// <strong>Limits:</strong> | ||
// <ul> | ||
// ${benefit.limit?.map(limit => ` | ||
// <li> | ||
// <strong>Value:</strong> ${limit.value?.value || "N/A"} ${limit.value?.unit || ""}<br> | ||
// <strong>Code:</strong> ${limit.code?.text || "N/A"} | ||
// </li> | ||
// `).join("") || "<li>None</li>"} | ||
// </ul> | ||
// </li> | ||
// `).join("") || "<li>None</li>"} | ||
// </ul> | ||
// </td> | ||
// <td> | ||
// <ul> | ||
// ${coverage.network?.map(network => ` | ||
// <li> | ||
// <strong>Resource:</strong> ${network.resource || "N/A"}<br> | ||
// <strong>Display:</strong> ${network.display || "N/A"} | ||
// </li> | ||
// `).join("") || "<li>None</li>"} | ||
// </ul> | ||
// </td> | ||
// </tr> | ||
// `).join("") || "<tr><td colspan='4'>No Coverage Available</td></tr>"} | ||
// </tbody> | ||
// </table> | ||
//# sourceMappingURL=Insuranceplan.js.map |
{ | ||
"name": "gcp-nrces-fhir", | ||
"version": "9.0.20", | ||
"version": "9.0.21", | ||
"description": "Google cloud healthcare api NRCES FHIR implimenataion", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2715983
29101