Skip to content
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
4 changes: 3 additions & 1 deletion client/src/components/c4dic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default function InsuranceCard() {
<hr/>
<h6>Benefits</h6>
{insInfo?.coverages.map(c => {
const startDateDiv = (c.startDate != null && c.startDate != "") ?
const startDateDiv = (c.startDate !== null && c.startDate !== "") ?
(
<div>
<text className="field-label">Start Date</text>
Expand Down Expand Up @@ -248,6 +248,8 @@ export default function InsuranceCard() {
</div>
</div>
)
default:
return []
}
})}
</div>
Expand Down
55 changes: 14 additions & 41 deletions client/src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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;
}
Expand Down
12 changes: 10 additions & 2 deletions server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down