Date: Fri, 29 Mar 2024 07:17:17 +0000 (UTC) Message-ID: <1659168518.360.1711696637170@9b64b402ade9> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_359_392886645.1711696637170" ------=_Part_359_392886645.1711696637170 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
I have the following contents in 'endpoint.json':
`
{
"nam=
e": "F=
HIR-to-EHR-1", "description":=
"Map a FHIR Patient resource to an EHR in openEHR",
"en=
dpoint": {
"pattern": "/fhir-ehr-1"
=
},
"transformation": {
"input=
": "JS=
ON",
"output": "JSON"
<=
span style=3D"color: rgb(220,220,220);">},
"inputM=
apping": {
"constants._type": "_type",
"constants.archetype_nod=
e_id": "archetype_node_id",
"constants.name.value": "name.value",
"c=
onstants.subject.external_ref.id._type": "subject.external_ref.id._type",
"constants.subject.external_ref.id.scheme"=
span>: "subject.external_ref.id.scheme",
"requestBody.identifier[0].value": "subject.external_ref.id.value",
"constants.subject.external_ref.type": "subject.e=
xternal_ref.type", "constants.is_modifiable":
"constants.is_queryabl=
e": "i=
s_queryable"
}, "constants" : {<=
/span>
"_type": "EHR_STATUS",
"archetype_node_id": "openEHR-EHR-EHR_S=
TATUS.generic.v1", "name": {
=
span>"value":=
"ehr status"
<=
span style=3D"color: rgb(156,220,254);">"subject": {
"ex=
ternal_ref": {
"id": {
"_type"=
: "GENERIC_ID=
",
"scheme": "id_scheme",
"value": "{{subjec=
tId}}"
},
"namespace": <=
span style=3D"color: rgb(206,145,120);">"openIMIS_ID",
"type": "PERSON"
<=
span style=3D"color: rgb(212,212,212);"> }
=
},
"is_mo=
difiable": "true",
},
"requests"=
: {
"response":=
[
=
{
"id": "request1",
"method": =
span>"post",
"url": "http://localhost:8081/ehrbase/rest/openehr/v1/ehr/",
"headers": {
"Content-Type": "application/json",
=
"Accept": "application/json"
"Pre=
fer": =
"return=3Drepresentation",<=
/span>
"Access-Control-Allow-Origin": "*"
//"Authorization": "Basic ZWhyYmFzZS1hZG1pbjpFdmVuTW9yZVNlY3JldFBhc3N3b=
3Jk"
}
}
}
]
}
}=
`
and an input json with the following content:
`
{
"res=
ourceType": "Patient",
=
"id":=
"1111101172"=
,
"extension": [
{ "url":<=
span style=3D"color: rgb(212,212,212);"> "https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/patient=
-is-head", [ "valueBoolean"=
: false {
},
{
"url": "https://openimis.github.io/openimis_fhir_r4_ig/St=
ructureDefinition/patient-card-issued",
"valueBoolean": false
},
"url": "https://openi=
mis.github.io/openimis_fhir_r4_ig/StructureDefinition/patient-group-referen=
ce",
"valueReference":
=
span>"reference": "Group/111111110",
"type=
": "Gr=
oup",
"identifier":
"type": =
{
"coding=
": [=
span>
{
"system": "https://openimis.github.io/openimis_f=
hir_r4_ig/CodeSystem/openimis-identifiers",
=
span>"code": =
"Code"
}
]
},
}
}
}
],
=
span>{
"t=
ype": =
{
"coding": [
{
"system":<=
span style=3D"color: rgb(212,212,212);"> "htt=
ps://openimis.github.io/openimis_fhir_r4_ig/CodeSystem/openimis-identifiers=
",
"code": "UUID"
}"Aby"
]<=
br> },
=
span>"value":=
"F9DABEDA-56EC-448E-893C-9=
1A486D3CD53"
{<=
br> "type":=
span> {
<=
/span>"coding": [
{
"system": "https://openimis.github.io/openimis_fhir_r4_ig/CodeSyste=
m/openimis-identifiers"=
,
"code": "Code"
}
<=
span style=3D"color: rgb(212,212,212);"> ]
=
},
"value=
": "11=
1111117"
}
],
<=
span style=3D"color: rgb(212,212,212);"> "name": [
{
"use"=
: "usu=
al",
"family": "Manth",
=
"given": [
]
}
],
"gender":<=
span style=3D"color: rgb(212,212,212);"> "female",
"birthDate": "2001-05-17",
"address": <=
/span>[
{=
"extension": [
{ "https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/add=
ress-municipality",
"valueString": "Achi"
},
{
"url": "https://openimis.github.io/openim=
is_fhir_r4_ig/StructureDefinition/address-location-reference"
"valueRefe=
rence": {
"reference":
"type": "Location",
"ident=
ifier": {
"type": {
"coding"=
: [
{
"system": <=
/span>"https://openimis.github.io/openimis_fhir_r4_i=
g/CodeSystem/openimis-identifiers",
}=
span>
]
},
"value": "R1D1M1V1"
}
}
}
=
],
"use": "home", "physical",
"text": "Jetset zone 85",
=
"city": "Rachla",
"district": "Rapta"
"state": "Ultha"<=
/span>
}
],
"photo": [
{
"contentType"=
: "jpg=
",
"url": "http://=
demo.openimis.org/photo/Images/Updated//111111117_E00001_20180327_0.0_0.0.j=
pg",
"title": "111111117_E00001_20180327_0.0_0.0.jpg",
=
"creation": "2018-03-27"<=
br> }
]
}
`
having created a channel in openHIM, I kept getting an error 'connect EC= ONNREFUSED 127.0.0.1: 8081'.
The error message from the orchestration is as follows:
`{ "x-mediator-urn": "urn:mediator:ge=
neric_mapper", "status": "Failed", "response": { "headers": { "content-type=
": "application/json+openhim", "content-length": "35" }, "status": 500, "bo=
dy": "connect ECONNREFUSED 127.0.0.1:8081", "timestamp": 1683821885375 }, "=
orchestrations": [ { "request": { "host": "", "port": "", "path": "", "meth=
od": "", "timestamp": "2023-05-11T16:18:05.023Z", "body": "{\"constants\":{\"=
span>_type\":\"EHR_STATUSexternal_ref\":{\"id\":{\"_type\"\"accept\":\"=
span>*/*\",\"postman-token:false},{\"url\":\"https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition=
/patient-card-issued\",\"<=
span style=3D"color: rgb(51,51,51);">:\"Group\",\"identifier\":{\"type\"=
:{\"coding\":[{\"system\":\"https://openimis.github.i=
o/openimis_fhir_r4_ig/CodeSystem/openimis-identifiers\",\"code<=
span class=3D"hljs-symbol" style=3D"color: rgb(153,0,115);">\":\"=
Code\"<=
/span>}]},\"value\":\"111111119\"=
}}}],\"=
identifier\":[{\"type\",\"identifier\":{\"type\":{,\"text\=
":\"Jetset zone 85\",<=
span class=3D"hljs-symbol" style=3D"color: rgb(153,0,115);">\"city\":\"Rachla\",\"district\":\"Rapta=
span>\"=
,\"state\":\"Ultha\"}],\"photo\"=
:[{\"=
span>contentType\":\"jpg\",\"url\"<=
span style=3D"color: rgb(51,51,51);">:\"http://de=
mo.openimis.org/photo/Images/Updated//111111117_E00001_20180327_0.0_0.0.jpg=
\"<=
/span>,\"title\":\"111111117_E00001_20180327_0.0_0.0.jpg\",\"creation=
span>\"=
:\"2018-03-27\"}]},\"responseBody\"=
:{\"_type\":\"EHR_STATUS\",\"archet=
ype_node_id\":\"openEHR-EHR-EHR_STATUS.generic.v1\",\"name\":{\"value<=
/span>\":\"ehr status\"},\"subject\":{\"external_ref\":{\"id\":{\"_type\":{\"_type\":\"GENERIC_ID\",id_scheme\",\"value\":\"F9DABED=
A-56EC-448E-893C-91A486D3CD53\"},namespace\":\"openIMIS_ID\",\"type\"<=
span style=3D"color: rgb(51,51,51);">:\"PERSON\"}},\"is_modifiable\":\"true\",\=
"is_queryable\":\"true=
\"}" }, "name": "Endpoint Mapping: FHIR-to-E=
HR-1" }, { "request": { "host": "localhost", "port": "8081", "path": "/ehrb=
ase/rest/openehr/v1/ehr/", "method": "post", "timestamp": "2023-05-11T16:18=
:05.181Z", "queryString": "&", "headers": { "x-openhim-transactionid": =
"645d153af188a60013b3ebd6", "Content-Type": "application/json", "Accept": "=
application/json", "Prefer": "return=3Drepresentation", "Access-Control-All=
ow-Origin": "*" }, "body": "{\"_type<=
/span>\":\"EHR_STATUS\",\"archetype_node_id\":\"=
openEHR-EHR-EHR_STATUS.generic=
.v1\"=
span>,\"name\":{\"value\":=
\"ehr status\"},\"subject\":{\"external_re=
f\":{\"id\":{\"_type\":\"GENERIC_ID\",\"<=
/span>scheme\":\"id_scheme\"is_modifiable\":\"true\",\"is_queryable\"<=
span style=3D"color: rgb(51,51,51);">:\"true=
\"}" }, "response": { "timesta=
mp": "2023-05-11T16:18:05.328Z" }, "name": "Endpoint Response Request: FHIR=
-to-EHR-1: request1", "error": { "message": "connect ECONNREFUSED 127.0.0.1=
:8081" } } ] }`
I have openEHR running on port 8081. can someone help look into the requ=
est part of my endpoint and tell me what could be missing or wrong to warra=
nt the orchestration error.