Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BFD-3818: IDR-based mapping of Patient resource using FHIR Mapping Language #2541

Merged
merged 22 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
# NOTE: The expression below can be extended to multi-line
# using a '\' as a continuation character.
# https://stackoverflow.com/questions/6268391/is-there-a-way-to-represent-a-long-string-that-doesnt-have-any-whitespace-on-mul
workflow_files_re: "^apps/(?!bfd-pipeline/bfd-pipeline-idr|utils).+$|^.github/workflows/ci-java.yml$"
workflow_files_re: "^apps/(?!bfd-pipeline/bfd-pipeline-idr|bfd-model/bfd-model-idr|utils).+$|^.github/workflows/ci-java.yml$"

jobs:
workflow:
Expand Down
38 changes: 38 additions & 0 deletions apps/bfd-model/bfd-model-idr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Placeholder directories + structures for mapping between IDR and FHIR.

To download the FHIR Validator:
https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar

To execute FHIR Mapping language transforms against the sample data.
To compile the StructureMap:
```sh
java -jar validator_cli.jar -ig maps/patient.map \
-compile https://bfd.cms.gov/MappingLanguage/Resources/Patient \
-version 4.0.1 -output StructureMaps/bfd_patient_structuremap.json
```

To execute:
```sh
java -jar validator_cli.jar sample-data/BeneficiarySample.json \
-output outputs/Patient.json \
-transform https://bfd.cms.gov/MappingLanguage/Resources/Patient \
-version 4.0.1 \
-ig StructureMaps/bfd_patient_structuremap.json \
-ig StructureDefinitions/Source/Bene-MBI.json \
-ig StructureDefinitions/Source/Bene.json \
-ig hl7.fhir.us.carin-bb#2.0.0 \
-ig maps/Patient-Helper.map
```


Validating sample resources against self-defined StructureDefinitions:
```sh
java -jar validator_cli.jar sample-data/<input>.json \
-ig StructureDefinitions/Source/<applicable structure definition>.json
```

Validate against C4BB:
```sh
java -jar validator_cli.jar outputs/<output_json>.json \
-ig hl7.fhir.us.carin-bb#2.0.0
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"resourceType": "StructureDefinition",
"id": "BENE_MBI",
"url": "http://hl7.org/fhir/StructureDefinition/BeneficiaryMBIIdentifier",
"name": "BENE_MBI",
"status": "draft",
"fhirVersion": "4.0.1",
"kind": "logical",
"abstract": true,
"type": "BeneficiaryMBIIdentifier",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
"derivation": "specialization",
"differential": {
"element": [
{
"id": "BeneficiaryMBIIdentifier",
"path": "BeneficiaryMBIIdentifier",
"label": "IDR MBI Base Resource. Ignore in DD Generation",
"definition": "BeneficiaryMBIIdentifier definition",
"min": 1,
"max": "1"
},
{
"id": "BeneficiaryMBIIdentifier.BENE_MBI_ID",
"path": "BeneficiaryMBIIdentifier.BENE_MBI_ID",
"label": "MBI ID",
"definition": "Medicare Beneficiary Identifier",
"min": 1,
"max": "1",
"type": [
{
"code": "string"
}
]
},
{
"id": "BeneficiaryMBIIdentifier.BENE_MBI_EFCTV_DT",
"path": "BeneficiaryMBIIdentifier.BENE_MBI_EFCTV_DT",
"label": "MBI Effective Date",
"definition": "Effective date of this MBI.",
"min": 1,
"max": "1",
"type": [
{
"code": "dateTime"
}
]
},
{
"id": "BeneficiaryMBIIdentifier.BENE_MBI_OBSLT_DT",
"path": "BeneficiaryMBIIdentifier.BENE_MBI_OBSLT_DT",
"label": "MBI Obsolete Date",
"definition": "Date this MBI was marked obsolete.",
"min": 0,
"max": "1",
"type": [
{
"code": "dateTime"
}
]
}
]
}
}
Loading