-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from jembi/TB-181-add-mapping-for-cr-candidates
Tb 181 add mapping for probabilistic patient matching
- Loading branch information
Showing
13 changed files
with
285 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
client-registry-jempi/importer/mapping-mediator/searchAllProbabilistic.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "Search Endpoint probabilistic", | ||
"endpoint": { | ||
"pattern": "/fhir/Patient/$match", | ||
"method": "POST" | ||
}, | ||
"transformation": { | ||
"input": "JSON", | ||
"output": "JSON" | ||
}, | ||
"constants": { | ||
"resourceType": "Bundle", | ||
"type": "searchset" | ||
}, | ||
"inputTransforms": { | ||
"total": "$count(lookupRequests.jempiSearchAllProbabilistic.data.goldenRecords)", | ||
"entry": "$map(lookupRequests.jempiSearchAllProbabilistic.data.goldenRecords, function($v) {{'fullUrl': 'Patient/' & $v.goldenId, 'resource': {'resourceType': 'Patient','id': $v.goldenId,'name': {'given': [$v.demographicData.givenName],'family': $v.demographicData.familyName},'address': [{'city': $v.demographicData.city}],'birthDate': $v.demographicData.dob,'telecom': [{'value': $v.demographicData.phoneNumber,'system': 'phone'}],'identifier': [{'system': $v.sourceId.facility,'value': $v.sourceId.patient},{'system': 'NationalID','value': $v.demographicData.nationalId}],'gender': $v.demographicData.gender}}})" | ||
}, | ||
"inputMapping": { | ||
"constants.resourceType": "resourceType", | ||
"constants.type": "type", | ||
"transforms.total": "total", | ||
"transforms.entry": "entry" | ||
}, | ||
"requests": { | ||
"lookup": [ | ||
{ | ||
"id": "jempiSearchAllProbabilistic", | ||
"forwardExistingRequestBody": true, | ||
"config": { | ||
"method": "post", | ||
"headers": { | ||
"contentType": "application/json" | ||
}, | ||
"url": "http://openhim-mapping-mediator:3003/search-response-probabilistic" | ||
}, | ||
"fhirResponse": true | ||
} | ||
] | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
client-registry-jempi/importer/mapping-mediator/searchAllProbabilisticResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"name": "Search Response Endpoint deterministic", | ||
"endpoint": { | ||
"pattern": "/search-response-probabilistic", | ||
"method": "POST" | ||
}, | ||
"transformation": { | ||
"input": "JSON", | ||
"output": "JSON" | ||
}, | ||
"inputValidation": { | ||
"type": "object", | ||
"properties": { | ||
"requestBody": { | ||
"type": "object", | ||
"properties": { | ||
"parameter": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"valueString": { | ||
"type": "string" | ||
}, | ||
"part": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"valueString": { | ||
"type": "string" | ||
}, | ||
"valueInteger": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": ["name"] | ||
} | ||
} | ||
}, | ||
"required": ["name", "valueString", "part"] | ||
}, | ||
"minItems": 1 | ||
} | ||
}, | ||
"required": ["parameter"] | ||
} | ||
} | ||
}, | ||
"inputTransforms": { | ||
"operands": "$append([], $map(requestBody.parameter, function($v) {{'operator': $single($v.part, function($v) {$v.name = 'operator'}).valueString, 'operand': {'fn': $single($v.part, function($v) {$v.name = 'fn'}).valueString, 'distance': $single($v.part, function($v) {$v.name = 'distance'}).valueInteger, 'name': $v.name, 'value': $v.valueString}}}))" | ||
}, | ||
"inputMapping": { | ||
"transforms.operands": "operands", | ||
"transforms.operands[0].operand": "operand" | ||
}, | ||
"requests": { | ||
"response": [ | ||
{ | ||
"id": "jempiSearchAllProbabilisticResponse", | ||
"config": { | ||
"method": "post", | ||
"url": "http://jempi-api:50000/JeMPI/cr-find" | ||
} | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.