-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Improve ErroneousRecordWriter to handle multiple sources
- Loading branch information
Showing
7 changed files
with
225 additions
and
26 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
2 changes: 2 additions & 0 deletions
2
tofhir-server/src/test/resources/test-data/patient-gender-simple.csv
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,2 @@ | ||
pid,gender | ||
test-patient,male |
2 changes: 2 additions & 0 deletions
2
tofhir-server/src/test/resources/test-data/patient-simple.csv
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,2 @@ | ||
pid | ||
test-patient |
51 changes: 51 additions & 0 deletions
51
tofhir-server/src/test/resources/test-mapping-job/patient-mapping-job-with-two-sources.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,51 @@ | ||
{ | ||
"name": "patient-job-test", | ||
"sourceSettings": { | ||
"patientSource": { | ||
"jsonClass": "FileSystemSourceSettings", | ||
"name": "patient-test-data", | ||
"sourceUri": "http://test-data", | ||
"dataFolderPath": "./test-data", | ||
"asStream": false | ||
}, | ||
"genderSource": { | ||
"jsonClass": "FileSystemSourceSettings", | ||
"name": "patient-gender-test-data", | ||
"sourceUri": "http://test-data", | ||
"dataFolderPath": "./test-data", | ||
"asStream": false | ||
} | ||
}, | ||
"sinkSettings": { | ||
"jsonClass": "FhirRepositorySinkSettings", | ||
"fhirRepoUrl": "http://localhost:8081/fhir", | ||
"returnMinimal": true | ||
}, | ||
"mappings": [ | ||
{ | ||
"name": "patient-mapping-with-two-sources", | ||
"mappingRef": "http://patient-mapping-with-two-sources", | ||
"sourceBinding": { | ||
"patient": { | ||
"jsonClass": "FileSystemSource", | ||
"path": "patient-simple.csv", | ||
"contentType": "csv", | ||
"options": {}, | ||
"sourceRef": "patientSource" | ||
}, | ||
"patientGender": { | ||
"jsonClass": "FileSystemSource", | ||
"path": "patient-gender-simple.csv", | ||
"contentType": "csv", | ||
"options": {}, | ||
"sourceRef": "genderSource" | ||
} | ||
} | ||
} | ||
], | ||
"dataProcessingSettings": { | ||
"saveErroneousRecords": true, | ||
"archiveMode": "off" | ||
}, | ||
"useFhirSinkAsIdentityService": false | ||
} |
42 changes: 42 additions & 0 deletions
42
tofhir-server/src/test/resources/test-mappings/patient-mapping-with-two-sources.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,42 @@ | ||
{ | ||
"id": "patient-mapping-two-sources", | ||
"url": "http://patient-mapping-with-two-sources", | ||
"name": "patient-mapping", | ||
"title": "Patient Mapping", | ||
"source": [ | ||
{ | ||
"alias": "patient", | ||
"url": "http://patient-schema", | ||
"joinOn": [ | ||
"pid" | ||
] | ||
}, | ||
{ | ||
"alias": "patientGender", | ||
"url": "http://patient-gender", | ||
"joinOn": [ | ||
"pid" | ||
] | ||
} | ||
], | ||
"context": {}, | ||
"variable": [], | ||
"mapping": [ | ||
{ | ||
"expression": { | ||
"name": "patient", | ||
"language": "application/fhir-template+json", | ||
"value": { | ||
"gender": "{{%patientGender.gender + 1}}", | ||
"id": "{{pid}}", | ||
"meta": { | ||
"profile": [ | ||
"http://hl7.org/fhir/StructureDefinition/Patient" | ||
] | ||
}, | ||
"resourceType": "Patient" | ||
} | ||
} | ||
} | ||
] | ||
} |
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