Skip to content

Commit 677d263

Browse files
add concept map, translate(), add field and initialization in generators.
add CLM_PPS_IND to SupportingInfo StructureDefinition initial
1 parent 55e0e8c commit 677d263

8 files changed

Lines changed: 34 additions & 1 deletion

apps/bfd-model-idr/augment_sample_resources.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def get_sort_key(item):
183183
"CLM_MDCR_NPMT_RSN_CD": "CLM_MDCR_NPMT_RSN_CD",
184184
"CLM_OP_SRVC_TYPE_CD": "CLM_OP_SRVC_TYPE_CD",
185185
"CLM_PPS_IND_CD": "CLM_PPS_IND_CD",
186+
"CLM_PPS_IND": "CLM_PPS_IND",
186187
"DGNS_DRG_CD": "DGNS_DRG_CD",
187188
"DGNS_DRG_OUTLIER_CD": "DGNS_DRG_OUTLIER_CD",
188189
"CLM_ACTV_CARE_THRU_DT": "CLM_ACTV_CARE_THRU_DT",

apps/bfd-model-idr/claims_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ class _ClaimsFile(StrEnum):
233233
f.CLM_NUM_SK,
234234
f.CLM_TYPE_CD,
235235
f.CLM_CRNT_STUS_CD,
236+
f.CLM_PPS_IND,
236237
f.IDR_INSRT_TS,
237238
f.IDR_UPDT_TS,
238239
],

apps/bfd-model-idr/claims_pac.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def gen_pac_clm(self, init_clm: RowAdapter):
127127

128128
if pac_clm_type_cd in FISS_CLM_TYPE_CDS:
129129
clm[f.CLM_RIC_CD] = get_ric_cd_for_clm_type_cd(pac_clm_type_cd)
130+
clm[f.CLM_PPS_IND] = random.choice(["N", "Y"])
130131

131132
clm[f.CLM_RLT_COND_SGNTR_SK] = gen_numeric_id(field=f.CLM_RLT_COND_SGNTR_SK, start=-2)
132133

@@ -160,6 +161,7 @@ def gen_clm_fiss(self, clm: RowAdapter, init_clm_fiss: RowAdapter | None = None)
160161
clm_fiss[f.GEO_BENE_SK] = clm[f.GEO_BENE_SK]
161162
clm_fiss[f.CLM_NUM_SK] = clm[f.CLM_NUM_SK]
162163
clm_fiss[f.CLM_TYPE_CD] = clm[f.CLM_TYPE_CD]
164+
clm_fiss[f.CLM_PPS_IND] = clm[f.CLM_PPS_IND]
163165

164166
add_meta_timestamps(clm_fiss, clm)
165167

apps/bfd-model-idr/dictionary-support-files/ExplanationOfBenefit.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,23 @@
24362436
fhirPath: ExplanationOfBenefit.adjudication.where(category.coding.where(system='https://bluebutton.cms.gov/fhir/CodeSystem/Adjudication' and code='CLM_MDCR_IP_PPS_CPTL_HRMLS_AMT').exists()).amount.value
24372437
profiles:
24382438
- CMS
2439+
- inputPath: ExplanationOfBenefit-Institutional-Base.CLM_PPS_IND
2440+
appliesTo:
2441+
- Inpatient
2442+
- Outpatient
2443+
- HHA
2444+
- Hospice
2445+
- SNF
2446+
sources:
2447+
- FISS
2448+
ccwMapping:
2449+
- CLM_PPS_IND
2450+
referenceTable: CLM_PPS_IND
2451+
sourceView: V2_MDCR_CLM_FISS
2452+
sourceColumn: CLM_PPS_IND
2453+
fhirPath: ExplanationOfBenefit.supportingInfo.where(category.coding.where(system='https://bluebutton.cms.gov/fhir/CodeSystem/Supporting-Information').exists() and category.coding.where(code='CLM_PPS_IND').exists()).code.coding.code
2454+
profiles:
2455+
- CMS
24392456
- inputPath: ExplanationOfBenefit-Institutional-Base.CLM_PPS_IND_CD
24402457
appliesTo:
24412458
- Inpatient

apps/bfd-model-idr/field_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@
212212
CLM_PMT_AMT = "CLM_PMT_AMT"
213213
CLM_POS_CD = "CLM_POS_CD"
214214
CLM_PPS_IND_CD = "CLM_PPS_IND_CD"
215+
CLM_PPS_IND = "CLM_PPS_IND"
215216
CLM_PPS_MD_WVR_STDZD_VAL_AMT = "CLM_PPS_MD_WVR_STDZD_VAL_AMT"
216217
CLM_PRCDR_CD = "CLM_PRCDR_CD"
217218
CLM_PRCDR_PRFRM_DT = "CLM_PRCDR_PRFRM_DT"

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,14 @@ conceptmap "CLM_DGNS_PRCDR_ICD_IND_DIAGNOSIS" {
502502
s:"0" == t:"http://hl7.org/fhir/sid/icd-10-cm"
503503
}
504504

505+
conceptmap "CLM_PPS_IND_CD" {
506+
prefix s = "https://hl7.org/fhir/string"
507+
prefix t = "https://bluebutton.cms.gov/fhir/CodeSystem/CLM-PPS-IND-CD"
508+
509+
s:"N" == t:" "
510+
s:"Y" == t:"2"
511+
}
512+
505513
conceptmap "HL7_DIAGTYPE" {
506514
prefix s = "https://hl7.org/fhir/string"
507515
prefix t = "http://terminology.hl7.org/CodeSystem/ex-diagnosistype"

apps/bfd-model-idr/maps/ExplanationOfBenefit-SupportingInfo-Helper.map

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ group addSupportingInfo(source src: SupportingInfoComponent, target tgt: Backbon
1212
src.CLM_BLOOD_PT_FRNSH_QTY as pintsFurnished -> tgt then addBloodPintsFurnished(src, tgt) "Add blood pints furnished";
1313
src.CLM_MDCR_INSTNL_MCO_PD_SW as mcoPdSw -> tgt then addMCOPdSw(src, tgt) "Add primary payer switch";
1414
src.CLM_PPS_IND_CD as ppsInd -> tgt then addPPSInd(src, tgt) "Add PPS Indicator";
15+
src.CLM_PPS_IND as ppsInd -> tgt then addPPSInd(src, tgt) "Add PPS Indicator";
1516
src.TYPE_OF_BILL_CD as tobCode -> tgt then addTypeOfBill(src, tgt) "Add type of bill code";
1617
src.CLM_NCH_WKLY_PROC_DT as procDt -> tgt then addProcessingDate(src, tgt) "Add processing date";
1718
src.CLM_ACTV_CARE_THRU_DT as activeThruDt -> tgt then addNCHThroughDate(src, tgt) "Add processing date";
@@ -297,6 +298,7 @@ group addPPSInd(source src: SupportingInfoComponent, target tgt: BackboneElement
297298
} "Add category";
298299
src -> tgt.code = create('CodeableConcept') as tgtCC then {
299300
src.CLM_PPS_IND_CD as val -> tgtCC.coding = c("https://bluebutton.cms.gov/fhir/CodeSystem/CLM-PPS-IND-CD",val) "Add coding";
301+
src.CLM_PPS_IND as val -> tgtCC.coding = translate(val,'https://bfd.cms.gov/MappingLanguage/Maps/ExplanationOfBenefit-Helper#CLM_PPS_IND_CD','coding') "Add coding";
300302
} "Add CC";
301303
}
302304
//code. Not necessary, duplicative with BENE_PTNT_STUS_CD.

apps/bfd-model-idr/sushi/input/fsh/StructureDefinition-SupportingInfoComponent.fsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Id: SupportingInfoComponent
2222
* CLM_ACTV_CARE_THRU_DT 0..1 date "Covered Care Through Date" ""
2323
* CLM_NCVRD_FROM_DT 0..1 date "Noncovered Stay From Date" ""
2424
* CLM_NCVRD_THRU_DT 0..1 date "Noncovered Stay Through Date" ""
25-
* CLM_PPS_IND_CD 0..1 string "Claim PPS Indicator Code" ""
25+
* CLM_PPS_IND_CD 0..1 string "Claim PPS Indicator Code Institutional" ""
26+
* CLM_PPS_IND 0..1 string "Claim PPS Indicator Code FISS" ""
2627
* CLM_NCH_PRMRY_PYR_CD 0..1 string "The code outlining the primary payer." ""
2728
* CLM_QLFY_STAY_FROM_DT 0..1 date "Qualified Stay From Date" ""
2829
* CLM_QLFY_STAY_THRU_DT 0..1 date "Qualified Stay Through Date" ""

0 commit comments

Comments
 (0)