gcp-nrces-fhir
Advanced tools
Comparing version 8.7.14 to 8.7.15
@@ -18,2 +18,3 @@ "use strict"; | ||
const gcp_1 = __importDefault(require("../classess/gcp")); | ||
const Encounter_1 = require("../resources/Encounter"); | ||
const Organization_1 = require("../resources/Organization"); | ||
@@ -83,2 +84,20 @@ const Patient_1 = require("../resources/Patient"); | ||
try { | ||
ret += `<h4>Status</h4>`; | ||
if (body.status) { | ||
ret += body.status; | ||
} | ||
} | ||
catch (error) { | ||
console.log(erorInfo, "Status", error); | ||
} | ||
try { | ||
ret += `<h4>Type</h4>`; | ||
if (body.type) { | ||
ret += this.codebleConceptToHtml(body.type); | ||
} | ||
} | ||
catch (error) { | ||
console.log(erorInfo, "Type", error); | ||
} | ||
try { | ||
if (body.identifier && body.identifier.length > 0) { | ||
@@ -95,2 +114,3 @@ ret += `<h4>Identifiers</h4>`; | ||
try { | ||
ret += `<h4>Diagnosis</h4>`; | ||
if (body.diagnosis && body.diagnosis.length > 0) { | ||
@@ -110,4 +130,74 @@ body.diagnosis.forEach((el) => { | ||
catch (error) { | ||
console.log(erorInfo, "identifier", error); | ||
console.log(erorInfo, "diagnosis", error); | ||
} | ||
try { | ||
if (body.item && body.item.length > 0) { | ||
for (let index = 0; index < body.item.length; index++) { | ||
const el = body.item[index]; | ||
if (el.encounter && el.encounter.length > 0) { | ||
ret += `<h4>Encounter</h4>`; | ||
for (let encounterIndex = 0; encounterIndex < el.encounter.length; encounterIndex++) { | ||
const encounterEl = el.encounter[encounterIndex]; | ||
const encounterId = this.getIdFromReference({ "ref": encounterEl.reference, "resourceType": "Encounter" }); | ||
const resource = yield new gcp_1.default().getFhirResource(encounterId, "Encounter"); | ||
const curEncounter = new Encounter_1.Encounter().convertFhirToObject(resource.data); | ||
ret += `Encounter : ${curEncounter.text} start Date : ${new TimeZone_1.TimeZone().convertTZ(curEncounter.startDate, "Asia/Kolkata", false)} ${curEncounter.endDate && `End Date : ${new TimeZone_1.TimeZone().convertTZ(curEncounter.startDate, "Asia/Kolkata", false)}`}`; | ||
} | ||
ret += `<h4>Product and services </h4>`; | ||
ret += `${el.sequence} Name : ${el.productOrService.coding.map(el => this.codingtoHtml(el)).join(", ")}, quantity: ${el.quantity.value} unitPrice ${el.unitPrice.value} ${el.unitPrice.currency}`; | ||
} | ||
} | ||
} | ||
} | ||
catch (error) { | ||
console.log(erorInfo, "Prodcut and services", error); | ||
} | ||
try { | ||
if (body.total) { | ||
ret += `<h4>Total ${body.total.value} ${body.total.currency} </h4>`; | ||
} | ||
} | ||
catch (error) { | ||
console.log(erorInfo, "Total", error); | ||
} | ||
try { | ||
ret += `<h4>Payee</h4>`; | ||
if (body.payee) { | ||
if (body.payee.type) { | ||
ret += this.codebleConceptToHtml(body.payee.type); | ||
} | ||
if (body.payee.party) { | ||
ret += `${body.payee.party.id} ${this.identifierToHtml(body.payee.party.identifier)}`; | ||
} | ||
} | ||
} | ||
catch (error) { | ||
console.log(erorInfo, "Payee", error); | ||
} | ||
try { | ||
if (body.supportingInfo) { | ||
ret += `<h4>Supporting Info</h4>`; | ||
for (let index = 0; index < body.supportingInfo.length; index++) { | ||
const el = body.supportingInfo[index]; | ||
if (el.category) { | ||
ret += `Category ${this.codebleConceptToHtml(el.category)}`; | ||
} | ||
if (el.code) { | ||
ret += `Code ${this.codebleConceptToHtml(el.code)}`; | ||
} | ||
if (el.valueAttachment) { | ||
const st = `${el.valueAttachment.title} Craeted On ${new TimeZone_1.TimeZone().convertTZ(el.valueAttachment.creation, "Asia/Kolkata", false)} }`; | ||
if (el.valueAttachment.url) { | ||
ret += `<a href=${el.valueAttachment.url}>${`Click Here ${st}`}</a>`; | ||
} | ||
if (el.valueAttachment.data) { | ||
ret += `<a href="data:${el.valueAttachment.contentType};base64,${el.valueAttachment.data}" download="download">Download ${st}</a> | ||
`; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
catch (error) { | ||
} | ||
return ret; | ||
@@ -114,0 +204,0 @@ } |
{ | ||
"name": "gcp-nrces-fhir", | ||
"version": "8.7.14", | ||
"version": "8.7.15", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2483523
25620