diff --git a/client/src/components/c4dic.tsx b/client/src/components/c4dic.tsx index f60fc3e..520b057 100644 --- a/client/src/components/c4dic.tsx +++ b/client/src/components/c4dic.tsx @@ -168,7 +168,7 @@ export default function InsuranceCard() {
Benefits
{insInfo?.coverages.map(c => { - const startDateDiv = (c.startDate != null && c.startDate != "") ? + const startDateDiv = (c.startDate !== null && c.startDate !== "") ? (
Start Date @@ -248,6 +248,8 @@ export default function InsuranceCard() {
) + default: + return [] } })} diff --git a/client/src/styles/index.scss b/client/src/styles/index.scss index 2e16d7a..2453e24 100644 --- a/client/src/styles/index.scss +++ b/client/src/styles/index.scss @@ -5,8 +5,6 @@ $image-path: "~@cmsgov/design-system/dist/images"; // Core CMSDS styles @import "@cmsgov/design-system/dist/scss/index"; -@import url('https://fonts.googleapis.com/css?family=Cutive+Mono|Teko'); - .ins-card { border-radius: 6px; width: 400px; @@ -21,7 +19,6 @@ $image-path: "~@cmsgov/design-system/dist/images"; 0 30px 50px -10px rgba(0,0,0,.2); } - .ins-c4dic-card { border-radius: 6px; width: 480px; @@ -36,37 +33,6 @@ $image-path: "~@cmsgov/design-system/dist/images"; } } -label { - font-family: 'Teko'; - text-transform: uppercase; - letter-spacing: 1px; - font-size: 13px; - display: block; - line-height: 0.675; -} - -input { - border-radius: 4px; - font-family: 'Cutive Mono'; - position: absolute; - background: transparent; - -webkit-font-smoothing: antialiased; - text-shadow: 0 1px 0 rgba(79, 48, 96,1); - border: none; - color: #f0f0f0; - font-size: 1.75rem; - padding: 0.125em 0; - transition: all .1s; - letter-spacing: 1px; - text-transform: uppercase; - - &:hover, - &:focus { - // background: rgba(255,255,255,.1); - outline: none; - } -} - .card-number { width: 345px; right: 20px; @@ -159,20 +125,26 @@ input[type=number]::-webkit-input-placeholder { background-position: center; .field-label { - font-size: 10px; - font-weight: lighter; - text-transform: uppercase; + font-size: 12px; + font-style: normal; + font-weight: 300; + line-height: normal; } .field-value { - font-size: 18px; + font-family: var(--theme-font-family-body, "Open Sans"); + font-size: var(--theme-font-size-md, 16px); + font-style: normal; + font-weight: var(--theme-font-weight-body-md, 700); + line-height: 150%; /* 24px */ } h6 { - font-size: 10px; + font-family: var(--theme-font-family-body, "Open Sans"); + font-size: var(--theme-font-size-sm, 14px); font-style: normal; - font-weight: 700; - line-height: normal; + font-weight: var(--theme-font-weight-body-sm, 700); + line-height: 150%; /* 21px */ margin: 0px } @@ -261,6 +233,7 @@ input[type=number]::-webkit-input-placeholder { .bb-c-c4dic-card-org-contact { .contact-list { + white-space: pre-line; display: grid; grid-template-columns: 1fr 1fr 1fr; } diff --git a/server/app.py b/server/app.py index 8b7893b..35f4a79 100644 --- a/server/app.py +++ b/server/app.py @@ -221,7 +221,13 @@ def get_patient_insurance(): for c in coverage_array: coverage = {} + c_resource_id = c['resource'].get('id') c_coverageClass = lookup_1_and_get("$.resource.class[?(@.type.coding[0].code=='plan')]", "value", c) + if c_coverageClass and (c_coverageClass != "Part A" or c_coverageClass != "Part B"): + if "c4dic-part-c" in c_resource_id: + c_coverageClass = "Part C" + elif "c4dic-part-d" in c_resource_id: + c_coverageClass = "Part D" coverage['coverageClass'] = c_coverageClass if c_coverageClass else "Null" c_status = c['resource']['status'] coverage['status'] = c_status @@ -258,9 +264,11 @@ def get_patient_insurance(): coverage['contacts'] = c_contacts c_contract_id = "" ## Part A and Part B does not have contract number if c_coverageClass == "Part C": - c_contract_id = lookup_1_and_get(f"$.resource.extension[?(@.url=='{CMS_VAR_PTC_CNTRCT_ID_01}')]", "valueCoding", c).get('code') + c_contract_id = lookup_1_and_get("$.resource.class[?(@.type.coding[0].code=='plan')]", "value", c) + # c_contract_id = lookup_1_and_get(f"$.resource.extension[?(@.url=='{CMS_VAR_PTC_CNTRCT_ID_01}')]", "valueCoding", c).get('code') if c_coverageClass == "Part D": - c_contract_id = lookup_1_and_get(f"$.resource.extension[?(@.url=='{CMS_VAR_PTD_CNTRCT_ID_01}')]", "valueCoding", c).get('code') + c_contract_id = lookup_1_and_get("$.resource.class[?(@.type.coding[0].code=='plan')]", "value", c) + # c_contract_id = lookup_1_and_get(f"$.resource.extension[?(@.url=='{CMS_VAR_PTD_CNTRCT_ID_01}')]", "valueCoding", c).get('code') coverage['contractId'] = c_contract_id c_reference_year = lookup_1_and_get(f"$.resource.extension[?(@.url=='{CMS_VAR_REF_YR}')]", "valueDate", c) coverage['referenceYear'] = c_reference_year