@@ -19,7 +19,6 @@ export type CoverageInfo = {
1919 startDate : string ,
2020 endDate : string ,
2121 payer : string ,
22- payerId : string ,
2322 status : string ,
2423 medicaidEligibility : string ,
2524 referenceYear : string ,
@@ -60,7 +59,6 @@ export default function InsuranceCard() {
6059 return {
6160 coverageClass : c . coverageClass ,
6261 payer : c . payer ,
63- payerId : c . payerId ,
6462 contractId : c . contractId ,
6563 startDate : c . startDate ,
6664 endDate : c . endDate ,
@@ -122,129 +120,129 @@ export default function InsuranceCard() {
122120 var backgroundColor = insInfo ?. coverages [ 0 ] ?. colorPalette . background
123121 var highlightColor = insInfo ?. coverages [ 0 ] ?. colorPalette . highlight
124122 var textColor = insInfo ?. coverages [ 0 ] ?. colorPalette . foreground
125- const primaryStyle = {
126- backgroundColor : backgroundColor ,
127- color : textColor
123+ const root = document . documentElement ;
124+ if ( backgroundColor != null ) {
125+ root . style . setProperty ( '--c4dic-backgroundColor' , backgroundColor ) ;
128126 }
129- const highlightStyle = {
130- backgroundColor : highlightColor ,
131- color : textColor
127+ if ( highlightColor != null ) {
128+ root . style . setProperty ( '--c4dic-highlightColor' , highlightColor ) ;
132129 }
130+ if ( textColor != null ) {
131+ root . style . setProperty ( '--c4dic-textColor' , textColor ) ;
132+ }
133+ const medicaidEligibility = ( insInfo ?. coverages [ 0 ] ?. medicaidEligibility != null ) ?
134+ (
135+ < div >
136+ < text className = "field-label" > Medicaid Eligibility</ text >
137+ < br />
138+ < div className = "bb-c-c4dic-badge-container" >
139+ < div className = "bb-c-c4dic-badge" > { insInfo ?. coverages [ 0 ] ?. medicaidEligibility } </ div >
140+ </ div >
141+ </ div >
142+ ) : null
133143 return (
134- < div className = "ins-c4dic-card" style = { primaryStyle } >
144+ < div className = "ins-c4dic-card" >
135145 < div className = "bb-c-c4dic-card-header" >
136146 < img src = { insInfo ?. coverages [ 0 ] ?. logo } alt = "C4DIC Logo" height = "48px" />
137147 < h3 > { insInfo ?. coverages [ 0 ] ?. payer } </ h3 >
138148 </ div >
139149 < div className = "pii-sec bb-c-c4dic-card-pii-area" >
140150 < div className = "ins-fld-text patient-name" >
141151 < div >
142- < text className = "field-label" > NAME </ text >
152+ < text className = "field-label" > Name </ text >
143153 < br />
144154 < text className = "field-value" > { insInfo ?. name || "" } </ text >
145155 </ div >
146156 </ div >
147157 < div className = "ins-fld-text patient-info" >
148158 < div >
149- < text className = "field-label" > MEDICARE NUMBER </ text >
159+ < text className = "field-label" > Medicare Number </ text >
150160 < br />
151161 < text className = "field-value" > { insInfo ?. identifier || "" } </ text >
152162 </ div >
153- < div >
154- < text className = "field-label" > PAYER ID</ text >
155- < br />
156- < text className = "field-value" > { insInfo ?. coverages [ 0 ] ?. payerId || "" } </ text >
157- </ div >
158- < div >
159- < text className = "field-label" > MEDICAID ELIGIBILITY</ text >
160- < br />
161- < text className = "field-value" > { insInfo ?. coverages [ 0 ] ?. medicaidEligibility || "TBD" } </ text >
162- </ div >
163+ { medicaidEligibility }
163164 </ div >
164165 </ div >
165166
166167 < div className = "coverage-sec bb-c-c4dic-card-coverages-area" >
167168 < hr />
168169 < h6 > Benefits</ h6 >
169170 { insInfo ?. coverages . map ( c => {
171+ const startDateDiv = ( c . startDate != null && c . startDate != "" ) ?
172+ (
173+ < div >
174+ < text className = "field-label" > Start Date</ text >
175+ < br />
176+ < text className = "field-value" > { c . startDate } </ text >
177+ </ div >
178+ ) : null
170179 switch ( c . coverageClass ) {
171180 case "Part A" :
172181 return (
173- < div className = "bb-c-c4dic-coverage" >
174- < div >
175- < text className = "field-label" > COVERAGE</ text >
176- < br />
177- < text className = "field-value" > { c . coverageClass } </ text >
178- </ div >
182+ < div className = "bb-c-c4dic-coverage-a" >
179183 < div >
180- < text className = "field-label" > START DATE </ text >
184+ < text className = "field-label" > Coverage </ text >
181185 < br />
182- < text className = "field-value" > { c . startDate } ??? ?, ???? </ text >
186+ < text className = "field-value" > Hospital < br /> { c . coverageClass } </ text >
183187 </ div >
188+ { startDateDiv }
184189 < div >
185- < text className = "field-label" > ENTITLEMENT REASON </ text >
190+ < text className = "field-label" > Entitlement Reason </ text >
186191 < br />
187192 < text className = "field-value" > { c . contractId } </ text >
188193 </ div >
189194 </ div >
190195 )
191196 case "Part B" :
192197 return (
193- < div className = "bb-c-c4dic-coverage" style = { highlightStyle } >
198+ < div className = "bb-c-c4dic-coverage-b" >
194199 < div >
195- < text className = "field-label" > COVERAGE </ text >
200+ < text className = "field-label" > Coverage </ text >
196201 < br />
197- < text className = "field-value" > { c . coverageClass } </ text >
198- </ div >
199- < div >
200- < text className = "field-label" > START DATE</ text >
201- < br />
202- < text className = "field-value" > { c . startDate } ??? ?, ????</ text >
202+ < text className = "field-value" > Medical< br /> { c . coverageClass } </ text >
203203 </ div >
204+ { startDateDiv }
204205 </ div >
205206 )
206207 case "Part C" :
208+ const partCTypeDiv = ( c . coverageClass != null ) ?
209+ (
210+ < div >
211+ < text className = "field-label" > Type</ text >
212+ < br />
213+ < text className = "field-value" > { c . coverageClass } </ text >
214+ </ div >
215+ ) : null
207216 return (
208- < div className = "bb-c-c4dic-coverage" >
217+ < div className = "bb-c-c4dic-coverage-c " >
209218 < div >
210- < text className = "field-label" > COVERAGE </ text >
219+ < text className = "field-label" > Coverage </ text >
211220 < br />
212- < text className = "field-value" > { c . coverageClass } </ text >
213- < br />
214- < text className = "field-label" > TYPE</ text >
215- < br />
216- < text className = "field-value" > { c . coverageClass } </ text >
221+ < text className = "field-value" > Advantage< br /> { c . coverageClass } </ text >
222+ { partCTypeDiv }
217223 </ div >
218224 < div >
219- < text className = "field-label" > PLAN #</ text >
225+ < text className = "field-label" > Plan #</ text >
220226 < br />
221227 < text className = "field-value" > { c . contractId } </ text >
222228 < br />
223- < text className = "field-label" > ORGANIZATION </ text >
229+ < text className = "field-label" > Organization </ text >
224230 < br />
225231 < text className = "field-value" > { c . payer } </ text >
226232 </ div >
227233 </ div >
228234 )
229235 case "Part D" :
230236 return (
231- < div className = "bb-c-c4dic-coverage" style = { highlightStyle } >
232- < div >
233- < text className = "field-label" > COVERAGE</ text >
234- < br />
235- < text className = "field-value" > { c . coverageClass } </ text >
236- </ div >
237+ < div className = "bb-c-c4dic-coverage-d" >
237238 < div >
238- < text className = "field-label" > START DATE</ text >
239- < br />
240- < text className = "field-value" > { c . startDate } ??? ?, ????</ text >
239+ < text className = "field-label" > Coverage</ text >
241240 < br />
242- < text className = "field-label" > PLAN #</ text >
243- < br />
244- < text className = "field-value" > { c . contractId } </ text >
241+ < text className = "field-value" > Rx< br /> { c . coverageClass } </ text >
245242 </ div >
246- < div >
247- < text className = "field-label" > COST SHARE</ text >
243+ { startDateDiv }
244+ < div >
245+ < text className = "field-label" > Plan #</ text >
248246 < br />
249247 < text className = "field-value" > { c . contractId } </ text >
250248 </ div >
@@ -257,7 +255,7 @@ export default function InsuranceCard() {
257255 < hr />
258256 < h6 > Contact</ h6 >
259257
260- < text className = "field-label" > CUSTOMER SERVICE </ text >
258+ < text className = "field-label" > Customer Service </ text >
261259 < br />
262260 < div className = "contact-list" >
263261 { insInfo ?. coverages [ 0 ] ?. contacts . map ( contact => {
0 commit comments