Skip to content

Commit b767c71

Browse files
authored
BFD-4295: Mappings for C4DIC Operation (#2806)
1 parent f71ec4c commit b767c71

13 files changed

Lines changed: 860 additions & 195 deletions

apps/bfd-model-idr/StructureDefinitions/Source/Bene.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"resourceType": "StructureDefinition",
33
"id": "Beneficiary",
4-
"url": "https://bfd.cms.gov/fhir/StructureDefinition/Beneficiary",
4+
"url": "http://hl7.org/fhir/StructureDefinition/Beneficiary",
55
"name": "Beneficary",
66
"status": "draft",
77
"fhirVersion": "4.0.1",

apps/bfd-model-idr/StructureDefinitions/Source/Coverage-Base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"resourceType": "StructureDefinition",
33
"id": "Coverage-Base",
4-
"url": "https://bfd.cms.gov/fhir/StructureDefinition/Coverage-Base",
4+
"url": "http://hl7.org/fhir/StructureDefinition/Coverage-Base",
55
"name": "Coverage-Base",
66
"status": "draft",
77
"fhirVersion": "4.0.1",
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"resourceType": "StructureDefinition",
3+
"id": "Operation-C4DIC",
4+
"url": "https://bfd.cms.gov/fhir/StructureDefinition/Operation-C4DIC",
5+
"name": "Operation-C4DIC",
6+
"status": "draft",
7+
"fhirVersion": "4.0.1",
8+
"kind": "logical",
9+
"abstract": true,
10+
"type": "Operation-C4DIC",
11+
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
12+
"derivation": "specialization",
13+
"differential": {
14+
"element": [
15+
{
16+
"id": "Operation-C4DIC",
17+
"path": "Operation-C4DIC",
18+
"label": "IDR Operation-C4DIC Base. Ignore in DD Generation",
19+
"min": 1,
20+
"max": "1"
21+
},
22+
{
23+
"id": "Operation-C4DIC.beneficiary",
24+
"path": "Operation-C4DIC.beneficiary",
25+
"label": "Beneficiary Information",
26+
"definition": "The beneficiary information for the C4DIC bundle",
27+
"min": 1,
28+
"max": "1",
29+
"type": [
30+
{
31+
"code": "Beneficiary",
32+
"targetProfile": ["https://bfd.cms.gov/fhir/StructureDefinition/Beneficiary"]
33+
}
34+
]
35+
},
36+
{
37+
"id": "Operation-C4DIC.coverageArray",
38+
"path": "Operation-C4DIC.coverageArray",
39+
"label": "Coverage Array",
40+
"definition": "Array of Coverage-Base elements for different Medicare parts (A, B, C, D, DUAL)",
41+
"min": 1,
42+
"max": "*",
43+
"type": [
44+
{
45+
"code": "Coverage-Base",
46+
"targetProfile": ["https://bfd.cms.gov/fhir/StructureDefinition/Coverage-Base"]
47+
}
48+
]
49+
},
50+
{
51+
"id": "Operation-C4DIC.lastUpdated",
52+
"path": "Operation-C4DIC.lastUpdated",
53+
"label": "Last Updated Time",
54+
"definition": "The time the C4DIC bundle was last updated",
55+
"min": 1,
56+
"max": "1",
57+
"type": [
58+
{
59+
"code": "dateTime"
60+
}
61+
]
62+
}
63+
]
64+
}
65+
}

apps/bfd-model-idr/compile_resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def main():
139139
print("Compiling FML ")
140140
compiled_map_path = f"StructureMaps/BFD-{Path(args.map).stem}-StructureMap.json"
141141
compile_cmd = (
142-
f"java -jar validator_cli.jar -ig {args.map} -compile {args.resource} -version 4.0.1 \
142+
f"java -jar validator_cli.jar -version 4.0.1 -ig {args.map} -compile {args.resource} \
143143
-output {compiled_map_path}"
144144
)
145145
print("Input compilation command was:" + compile_cmd)

apps/bfd-model-idr/maps/Coverage-Base.map

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//Must appear in order map -> conceptmap -> uses -> imports -> groups
33
map "https://bfd.cms.gov/MappingLanguage/Maps/Coverage-Base" = "BFD-Coverage-Base-Map"
44

5-
uses "https://bfd.cms.gov/fhir/StructureDefinition/Coverage-Base" alias CoverageBase as source
5+
uses "http://hl7.org/fhir/StructureDefinition/Coverage-Base" alias CoverageBase as source
66
//hl7.org urls are used for dependent resources as the FHIR validator resolves them as such.
77

88
//The first specified target is what the default output will output as the ResourceType
@@ -499,7 +499,7 @@ group SetOrganizationEntryCMS(source src : CoverageBase, target tgt : Organizati
499499

500500
src -> tgt.id = "cms-org" "set org id";
501501
src -> tgt.active = true "set org as active";
502-
src -> tgt.name = 'Centers for Medicare and Medicaid Services' "set org name";
502+
src -> tgt.name = 'Centers for Medicare & Medicaid Services' "set org name";
503503
src -> tgt.contact = create('BackboneElement') as tgtContact then{
504504
src -> tgtContact.purpose = create('CodeableConcept') as purposeCC,
505505
purposeCC.coding = create('Coding') as tempCode,

apps/bfd-model-idr/maps/Coverage-Helper.map

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ conceptmap "BENE_ESRD_STUS_ID" {
44
prefix s = "https://bluebutton.cms.gov/fhir/CodeSystem/BENE-MDCR-STUS-CD"
55
prefix t = "https://bluebutton.cms.gov/fhir/CodeSystem/BENE-ESRD-STUS-ID"
66

7-
s:0 = t:"U"
8-
s:00 = t:"U"
9-
s:10 = t:"N"
10-
s:11 = t:"Y"
11-
s:20 = t:"N"
12-
s:21 = t:"Y"
13-
s:31 = t:"Y"
14-
s:40 = t:"N"
15-
s:"~" = t:"null"
7+
s:0 == t:"U"
8+
s:00 == t:"U"
9+
s:10 == t:"N"
10+
s:11 == t:"Y"
11+
s:20 == t:"N"
12+
s:21 == t:"Y"
13+
s:31 == t:"Y"
14+
s:40 == t:"N"
15+
s:"~" == t:"null"
1616
}
1717

1818
conceptmap "BENE_DSBLD_STUS_ID" {
1919
prefix s = "https://bluebutton.cms.gov/fhir/CodeSystem/BENE-MDCR-STUS-CD"
2020
prefix t = "https://bluebutton.cms.gov/fhir/CodeSystem/BENE-DSBLD-STUS-ID"
2121

22-
s:0 = t:"U"
23-
s:00 = t:"U"
24-
s:10 = t:"N"
25-
s:11 = t:"N"
26-
s:20 = t:"Y"
27-
s:21 = t:"Y"
28-
s:31 = t:"N"
29-
s:40 = t:"N"
30-
s:"~" = t:"null"
22+
s:0 == t:"U"
23+
s:00 == t:"U"
24+
s:10 == t:"N"
25+
s:11 == t:"N"
26+
s:20 == t:"Y"
27+
s:21 == t:"Y"
28+
s:31 == t:"N"
29+
s:40 == t:"N"
30+
s:"~" == t:"null"
3131
}
3232

apps/bfd-model-idr/maps/EOB-Base.map

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ group createEOBBase(source src: ExplanationOfBenefitBase, target tgt: BFDEOB){
255255
src.CLM_TYPE_CD as claimType -> tgt.insurance = create('BackboneElement') as tgtBBElement then {
256256
src -> tgtBBElement.focal = true "Add focal";
257257
src -> tgtBBElement.coverage = create('Reference') as tgtReference then {
258-
//claimType -> tgtReference.display = translate(claimType,'https://bfd.cms.gov/MappingLanguage/Maps/EOB-Helper#CLM_TYPE_TO_COVERAGE_PART','code') "Add temp coverage placeholder";
259258
src.CLM_NRLN_RIC_CD as nearLineAdjudicated -> tgtReference.display = translate(nearLineAdjudicated,"https://bfd.cms.gov/MappingLanguage/Maps/EOB-Helper#RIC_CD",'code') "Add coverage type";
260259
src.CLM_RIC_CD as nearLinePartiallyAdjudicated -> tgtReference.display = translate(nearLinePartiallyAdjudicated,"https://bfd.cms.gov/MappingLanguage/Maps/EOB-Helper#RIC_CD",'code') "Add coverage type";
261260
//CLM_RIC_CD not in MCS :shrug:
@@ -806,7 +805,7 @@ group createInsurerOrgPartAB(source src: ExplanationOfBenefitBase, target tgtOrg
806805
src -> tgtMeta.profile = "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization|6.1.0" "Set org profile";
807806
} "Set organization metadata";
808807
src -> tgtOrg.active = "true" "set org status";
809-
src -> tgtOrg.name = "Centers for Medicare and Medicaid Services" "set org name";
808+
src -> tgtOrg.name = "Centers for Medicare & Medicaid Services" "set org name";
810809
}
811810

812811
group createProviderOrg(source src: ExplanationOfBenefitBase, target tgt: Organization){

0 commit comments

Comments
 (0)