Skip to content

Commit

Permalink
Pilot testing updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pmanko committed May 3, 2024
1 parent 6438872 commit b914be7
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
49 changes: 49 additions & 0 deletions data/templates/hl7v2/DataType/CWECodeableConceptIpms.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"coding":
[
{
{{#if mapping}}
{{#with (evaluate mapping inCode=CWE-1)}}
"code":"{{code}}",
"display":"{{display}}",
"system":"{{system}}",
"version":"{{version}}",
{{/with}}
{{else}}
"code":"{{CWE-1}}",
"display":"{{CWE-2}}",
"system":"https://api.openconceptlab.org/orgs/I-TECH-UW/sources/IPMSLAB/",
"version":"{{CWE-7}}",
{{/if}}
},
{
{{#if mapping}}
{{#with (evaluate mapping inCode=CWE-4)}}
"code":"{{code}}",
"display":"{{display}}",
"system":"{{system}}",
"version":"{{version}}",
{{/with}}
{{else}}
"code":"{{CWE-4}}",
"display":"{{CWE-5}}",
"system":"https://api.openconceptlab.org/orgs/I-TECH-UW/sources/IPMSLAB/",
"version":"{{CWE-8}}",
{{/if}}
},
{
{{#if mapping}}
{{#with (evaluate mapping inCode=CWE-10)}}
"code":"{{code}}",
"display":"{{display}}",
"system":"{{system}}",
"version":"{{version}}",
{{/with}}
{{else}}
"code":"{{CWE-10}}",
"display":"{{CWE-11}}",
"system":"https://api.openconceptlab.org/orgs/I-TECH-UW/sources/IPMSLAB/",
"version":"{{CWE-13}}",
{{/if}}
},
],
"text":"{{CWE-9}}",
2 changes: 1 addition & 1 deletion data/templates/hl7v2/Resources/DiagnosticReport.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
{{/if}},
"code":
{
{{>DataType/CWECodeableConcept.hbs CWE=OBR-4}},
{{>DataType/CWECodeableConceptIpms.hbs CWE=OBR-4}},
},
"effectivePeriod":
{
Expand Down
3 changes: 2 additions & 1 deletion src/lib/fhir/fhir.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ module.exports = class fhir extends dataHandler {
res = this.setProviderData(provider, res);

res.facilityId = sourceLocation ? sourceLocation.id : "";
res.labOrderId = task.identifier ? task.identifier[0].value : "";
res.labOrderId = serviceRequest ? serviceRequest.id : "";

let orderDateTime = new Date()
try {
orderDateTime = serviceRequest.authoredOn ? new Date(serviceRequest.authoredOn) : (task.authoredOn ? new Date(task.authoredOn) : orderDateTime)
Expand Down

0 comments on commit b914be7

Please sign in to comment.