Skip to content

Commit

Permalink
SMILECDR-528-Address-Case-Sensitive-On-MRN
Browse files Browse the repository at this point in the history
  • Loading branch information
amakineni committed Oct 16, 2023
1 parent eaa1eaf commit 0bf1e2a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
30 changes: 16 additions & 14 deletions hl7v2_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!dept || dept == '' ? mrnfacility + '-PV1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(dept).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!dept || dept == '' ? mrnfacility + '-PV1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(dept.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "dept"}, {"xpath": "point_of_care"},
{"const": "setid"}, {"xpath": "set_id"},
{"const": "mrnfacility"}, {"xpath": "..", "template": "concat_mrn_facility"}
Expand All @@ -1816,7 +1816,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!planid || planid == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(planid).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!planid || planid == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(planid.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "planid"}, {"xpath": "plan_id"},
{"const": "setid"}, {"xpath": "set_id", "template": "transform_insurance_set_id"},
{"const": "mrnfacility"}, {"xpath": "../..", "template": "concat_mrn_facility", "_comment": "IN1 passed in, navigate to root so PID can be referenced"}
Expand All @@ -1827,7 +1827,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!policy_number || policy_number == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(policy_number).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!policy_number || policy_number == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(policy_number.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "policy_number"}, {"xpath": "policy_number"},
{"const": "setid"}, {"xpath": "set_id", "template": "transform_insurance_set_id"},
{"const": "mrnfacility"}, {"xpath": "../..", "template": "concat_mrn_facility", "_comment": "IN1 passed in, navigate to root so PID can be referenced"}
Expand All @@ -1838,7 +1838,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!npi || npi == '' ? mrnfacility + '-PV1-' + idtype : mrnfacility + '-' + encodeURIComponent(npi).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!npi || npi == '' ? mrnfacility + '-PV1-' + idtype : mrnfacility + '-' + encodeURIComponent(npi.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "npi"}, {"xpath": "attending_physician_id"},
{"const": "idtype"}, {"const": "ATND"},
{"const": "mrnfacility"}, {"xpath": "..", "template": "concat_mrn_facility"}
Expand All @@ -1849,7 +1849,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!npi || npi == '' ? mrnfacility + '-PV1-' + idtype : mrnfacility + '-' + encodeURIComponent(npi).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!npi || npi == '' ? mrnfacility + '-PV1-' + idtype : mrnfacility + '-' + encodeURIComponent(npi.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "npi"}, {"xpath": "referring_physician_id"},
{"const": "idtype"}, {"const": "REF"},
{"const": "mrnfacility"}, {"xpath": "..", "template": "concat_mrn_facility"}
Expand Down Expand Up @@ -1915,7 +1915,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!guarantornumber || guarantornumber == '' ? mrnfacility + '-GT1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(guarantornumber).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!guarantornumber || guarantornumber == '' ? mrnfacility + '-GT1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(guarantornumber.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "guarantornumber"}, {"xpath": "guarantor_number"},
{"const": "setid"}, {"xpath": "set_id", "template": "transform_guarantor_set_id"},
{"const": "mrnfacility"}, {"xpath": "../..", "template": "concat_mrn_facility"}
Expand All @@ -1926,7 +1926,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!planid || planid == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(planid).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!planid || planid == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(planid.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "planid"}, {"xpath": "plan_id"},
{"const": "setid"}, {"xpath": "set_id", "template": "transform_insurance_set_id"},
{"const": "mrnfacility"}, {"xpath": "../..", "template": "concat_mrn_facility"}
Expand All @@ -1944,11 +1944,12 @@
},
"patient_put_request": {
"custom_func": {
"name": "concat",
"name": "javascript",
"args": [
{ "const": "Patient?identifier=https://pediatrix.com/fhir/NamingSystem/mrn-id|" },
{ "xpath": "PID/mrn" },
{ "const": "&mrn-assigner=urn:uuid:61ebe121-aa02-0001-0001-983a382abcd7" }
{ "const": "Patientidentifier + mrn.toUpperCase() + mrnassigner" },
{ "const": "Patientidentifier" }, {"const": "Patient?identifier=https://pediatrix.com/fhir/NamingSystem/mrn-id|" },
{ "const": "mrn" }, { "xpath": "PID/mrn" },
{ "const": "mrnassigner" }, { "const": "&mrn-assigner=urn:uuid:61ebe121-aa02-0001-0001-983a382abcd7" }
]
}
},
Expand Down Expand Up @@ -2044,10 +2045,11 @@
},
"concat_mrn_facility": {
"custom_func": {
"name": "concat",
"name": "javascript",
"args": [
{ "xpath": "PID/mrn" },
{ "const": "-{{FacilityId}}" }
{"const": "mrn.toUpperCase() + Facility_Id"},
{"const": "mrn"},{ "xpath": "PID/mrn" },
{"const": "Facility_Id"},{ "const": "-{{FacilityId}}" }
]
}
},
Expand Down
18 changes: 10 additions & 8 deletions hl7v2_default_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@
"custom_func": {
"name": "javascript",
"args": [
{"const": "!policy_number || policy_number == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(policy_numbe.toUpperCase()r).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "!policy_number || policy_number == '' ? mrnfacility + '-IN1-' + setid.toString() : mrnfacility + '-' + encodeURIComponent(policy_number.toUpperCase()).replace(/\\%[A-F0-9]{2}/g,'')"},
{"const": "policy_number"}, {"xpath": "policy_number"},
{"const": "setid"}, {"xpath": "set_id", "template": "transform_insurance_set_id"},
{"const": "mrnfacility"}, {"xpath": "../..", "template": "concat_mrn_facility", "_comment": "IN1 passed in, navigate to root so PID can be referenced"}
Expand Down Expand Up @@ -1944,11 +1944,12 @@
},
"patient_put_request": {
"custom_func": {
"name": "concat",
"name": "javascript",
"args": [
{ "const": "Patient?identifier=https://pediatrix.com/fhir/NamingSystem/mrn-id|" },
{ "xpath": "PID/mrn" },
{ "const": "&mrn-assigner=urn:uuid:61ebe121-aa02-0001-0001-983a382abcd7" }
{ "const": "Patientidentifier + mrn.toUpperCase() + mrnassigner" },
{ "const": "Patientidentifier" }, {"const": "Patient?identifier=https://pediatrix.com/fhir/NamingSystem/mrn-id|" },
{ "const": "mrn" }, { "xpath": "PID/mrn" },
{ "const": "mrnassigner" }, { "const": "&mrn-assigner=urn:uuid:61ebe121-aa02-0001-0001-983a382abcd7" }
]
}
},
Expand Down Expand Up @@ -2044,10 +2045,11 @@
},
"concat_mrn_facility": {
"custom_func": {
"name": "concat",
"name": "javascript",
"args": [
{ "xpath": "PID/mrn" },
{ "const": "-{{FacilityId}}" }
{"const": "mrn.toUpperCase() + Facility_Id"},
{"const": "mrn"},{ "xpath": "PID/mrn" },
{"const": "Facility_Id"},{ "const": "-{{FacilityId}}" }
]
}
},
Expand Down

0 comments on commit 0bf1e2a

Please sign in to comment.