fhir-react 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish_npmjs.yml +20 -0
- package/.storybook/config.js +9 -3
- package/.storybook/presets.js +1 -0
- package/.storybook/preview-head.html +4 -0
- package/README.md +41 -13
- package/build/bootstrap-reboot.min.css +2 -22
- package/build/index.js +38 -3
- package/build/style.css +11 -227
- package/package.json +13 -4
- package/src/assets/common/chevron-right.svg +3 -0
- package/src/assets/containers/AllergyIntolerance/allergy-intolerance.svg +9 -0
- package/src/assets/containers/Appointment/appointment.svg +14 -0
- package/src/assets/containers/CarePlan/care-plan.svg +10 -0
- package/src/assets/containers/CareTeam/care-team.svg +10 -0
- package/src/assets/containers/Claim/claim.svg +6 -0
- package/src/assets/containers/ClaimResponse/claim-response.svg +7 -0
- package/src/assets/containers/Condition/condition.svg +11 -0
- package/src/assets/containers/Device/device.svg +8 -0
- package/src/assets/containers/DiagnosticReport/diagnostic-report.svg +14 -0
- package/src/assets/containers/DocumentReference/document-reference.svg +10 -0
- package/src/assets/containers/Encounter/encounter.svg +10 -0
- package/src/assets/containers/ExplanationOfBenefit/explanation-of-benefit.svg +3 -0
- package/src/assets/containers/FamilyMemberHistory/family-member-history.svg +7 -0
- package/src/assets/containers/Goal/goal.svg +11 -0
- package/src/assets/containers/Immunization/immunization.svg +7 -0
- package/src/assets/containers/List/list.svg +3 -0
- package/src/assets/containers/Location/location.svg +4 -0
- package/src/assets/containers/Medication/medication.svg +5 -0
- package/src/assets/containers/MedicationAdministration/medication-administration.svg +6 -0
- package/src/assets/containers/MedicationKnowledge/medication-knowledge.svg +11 -0
- package/src/assets/containers/MedicationStatement/medication-statement.svg +5 -0
- package/src/assets/containers/Observation/observation.svg +12 -0
- package/src/assets/containers/Practitioner/practitioner.svg +5 -0
- package/src/assets/containers/Procedure/procedure.svg +9 -0
- package/src/assets/containers/Questionnaire/questionnaire.svg +6 -0
- package/src/assets/containers/QuestionnaireResponse/questionnaire-response.svg +6 -0
- package/src/assets/containers/QustionnaireResponse/questionnaire-response.svg +6 -0
- package/src/assets/containers/ResearchStudy/research-study.svg +9 -0
- package/src/assets/containers/ResourceCategory/resource-placeholder.svg +3 -0
- package/src/components/containers/Accordion/Accordion.js +80 -0
- package/src/components/containers/Accordion/Accordion.stories.js +76 -0
- package/src/components/containers/Accordion/index.js +3 -0
- package/src/components/containers/ResourceContainer/ResourceContainer.css +0 -1
- package/src/components/containers/ResourceContainer/ResourceContainer.js +1 -1
- package/src/components/datatypes/AccountBalance/AccountBalance.js +33 -0
- package/src/components/datatypes/AccountBalance/index.js +3 -0
- package/src/components/datatypes/Annotation/Annotation.js +1 -1
- package/src/components/datatypes/Coding/Coding.js +1 -1
- package/src/components/datatypes/Date/Date.js +14 -4
- package/src/components/datatypes/DatePeriod/DatePeriod.js +38 -0
- package/src/components/datatypes/DatePeriod/index.js +3 -0
- package/src/components/datatypes/HeaderIcon/HeaderIcon.js +31 -0
- package/src/components/datatypes/HeaderIcon/index.js +3 -0
- package/src/components/datatypes/HumanName/HumanName.js +6 -21
- package/src/components/datatypes/Reference/Reference.js +3 -6
- package/src/components/resources/AdverseEvent/AdverseEvent.test.js +2 -2
- package/src/components/resources/AllergyIntolerance/AllergyIntolerance.test.js +4 -4
- package/src/components/resources/Appointment/Appointment.js +91 -65
- package/src/components/resources/Appointment/Appointment.test.js +3 -3
- package/src/components/resources/Bundle/Bundle.js +2 -2
- package/src/components/resources/Bundle/Bundle.stories.js +78 -12
- package/src/components/resources/Bundle/Bundle.test.js +3 -0
- package/src/components/resources/CarePlan/CarePlan.test.js +4 -4
- package/src/components/resources/CareTeam/CareTeam.js +13 -14
- package/src/components/resources/CareTeam/CareTeam.test.js +4 -4
- package/src/components/resources/Claim/Claim.test.js +6 -6
- package/src/components/resources/ClaimResponse/ClaimResponse.test.js +6 -6
- package/src/components/resources/Condition/Condition.js +63 -47
- package/src/components/resources/Condition/Condition.stories.js +41 -8
- package/src/components/resources/Condition/Condition.test.js +20 -14
- package/src/components/resources/DiagnosticReport/DiagnosticReport.test.js +5 -7
- package/src/components/resources/DocumentReference/DocumentReference.js +1 -1
- package/src/components/resources/DocumentReference/DocumentReference.test.js +3 -3
- package/src/components/resources/Encounter/Encounter.js +66 -36
- package/src/components/resources/Encounter/EncounterParticipants.js +2 -2
- package/src/components/resources/ExplanationOfBenefit/CareTeam.js +2 -2
- package/src/components/resources/ExplanationOfBenefit/Diagnosis.js +31 -5
- package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.js +272 -201
- package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.stories.js +12 -0
- package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.test.js +96 -62
- package/src/components/resources/ExplanationOfBenefit/Items.js +2 -2
- package/src/components/resources/ExplanationOfBenefit/PriceLabel.js +20 -0
- package/src/components/resources/ExplanationOfBenefit/Related.js +3 -3
- package/src/components/resources/ExplanationOfBenefit/SupportingInfo.js +14 -3
- package/src/components/resources/ExplanationOfBenefit/TotalGraph.js +68 -0
- package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.js +89 -0
- package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.stories.js +78 -0
- package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.test.js +51 -0
- package/src/components/resources/ExplanationOfBenefitGraph/index.js +3 -0
- package/src/components/resources/Goal/Goal.test.js +1 -1
- package/src/components/resources/Immunization/Immunization.js +125 -94
- package/src/components/resources/Immunization/Immunization.stories.js +23 -4
- package/src/components/resources/Immunization/Immunization.test.js +17 -12
- package/src/components/resources/List/List.test.js +3 -3
- package/src/components/resources/MedicationAdministration/MedicationAdministration.test.js +7 -7
- package/src/components/resources/MedicationDispense/MedicationDispense.test.js +2 -2
- package/src/components/resources/MedicationRequest/MedicationRequest.test.js +4 -4
- package/src/components/resources/Observation/Observation.js +72 -54
- package/src/components/resources/Observation/Observation.test.js +6 -18
- package/src/components/resources/Observation/ObservationGraph.js +159 -55
- package/src/components/resources/Observation/ObservationGraph.test.js +47 -26
- package/src/components/resources/Patient/Patient.js +79 -97
- package/src/components/resources/Patient/Patient.test.js +10 -10
- package/src/components/resources/Practitioner/Practitioner.js +80 -60
- package/src/components/resources/Practitioner/Practitioner.test.js +4 -4
- package/src/components/resources/Procedure/Procedure.js +99 -87
- package/src/components/resources/Procedure/Procedure.stories.js +8 -6
- package/src/components/resources/Procedure/Procedure.test.js +11 -8
- package/src/components/resources/Questionnaire/Questionnaire.test.js +3 -3
- package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.test.js +5 -5
- package/src/components/resources/ReferralRequest/ReferralRequest.test.js +2 -2
- package/src/components/resources/ResearchStudy/ResearchStudy.test.js +1 -1
- package/src/components/resources/ResourceCategory/ResourceCategory.js +56 -0
- package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +29 -0
- package/src/components/resources/ResourceCategory/ResourceCategory.test.js +101 -0
- package/src/components/resources/ResourceCategory/index.js +3 -0
- package/src/components/ui/_header.scss +3 -0
- package/src/components/ui/bootstrap-reboot.min.css +2 -22
- package/src/components/ui/index.js +191 -29
- package/src/constants/badge-status.jsx +98 -0
- package/src/fixtures/dstu2/resources/condition/condition.svg +35 -0
- package/src/fixtures/dstu2/resources/immunization/immunization.svg +10 -0
- package/src/fixtures/example-icons.jsx +169 -0
- package/src/fixtures/r4/resources/explanationOfBenefit/c4bbExtendedDiagnosis.json +446 -0
- package/src/index.js +6 -1
- package/src/style.scss +176 -0
- package/src/utils/formatDate.js +21 -0
- package/src/utils/formatDate.test.js +22 -0
- package/src/utils/getBadgeColor.js +6 -0
- package/src/utils/getBadgeColor.test.js +14 -0
- package/src/utils/isUrl.js +9 -0
- package/src/utils/isUrl.test.js +12 -0
- package/src/utils.js +7 -0
- package/src/components/datatypes/HumanName/HumanName.css +0 -15
- package/src/components/datatypes/Reference/Reference.css +0 -8
- package/src/components/resources/Observation/ObservationGraph.css +0 -51
- package/src/components/resources/Patient/Patient.css +0 -19
- package/src/components/ui/index.css +0 -123
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
{
|
|
2
|
+
"resourceType": "ExplanationOfBenefit",
|
|
3
|
+
"id": "e6c4234b-19a8-4e5c-35cb-5d05a97d5788",
|
|
4
|
+
"meta": {
|
|
5
|
+
"profile": [
|
|
6
|
+
"http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Inpatient-Institutional"
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"related": [
|
|
10
|
+
{
|
|
11
|
+
"reference": {
|
|
12
|
+
"value": "Q19137E17126"
|
|
13
|
+
},
|
|
14
|
+
"claim": {
|
|
15
|
+
"reference": "ExplanationOfBenefit/EqUVAXt5WrNnlJPdB7swbxJXaYxxnvBxWwGPxUx1up"
|
|
16
|
+
},
|
|
17
|
+
"relationship": {
|
|
18
|
+
"coding": [
|
|
19
|
+
{
|
|
20
|
+
"code": "prior",
|
|
21
|
+
"system": "http://terminology.hl7.org/CodeSystem/ex-relatedclaimrelationship"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"reference": {
|
|
28
|
+
"value": "Q19137E17126"
|
|
29
|
+
},
|
|
30
|
+
"claim": {
|
|
31
|
+
"reference": "ExplanationOfBenefit/ABCDEXg2WrYnlJrdr7sabxZZaYffnvBxWwGPx99999"
|
|
32
|
+
},
|
|
33
|
+
"relationship": {
|
|
34
|
+
"coding": [
|
|
35
|
+
{
|
|
36
|
+
"code": "replacedby",
|
|
37
|
+
"system": "http://terminology.hl7.org/CodeSystem/ex-relatedclaimrelationship"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"payee": {
|
|
44
|
+
"type": {
|
|
45
|
+
"coding": [
|
|
46
|
+
{
|
|
47
|
+
"code": "provider",
|
|
48
|
+
"system": "http://terminology.hl7.org/CodeSystem/payeetype"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"party": {
|
|
53
|
+
"reference": "Organization/iAxXvHiphwGGAL48m3B7XXtKlLZg6yXnC1ch84x1up"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"contained": [
|
|
57
|
+
{
|
|
58
|
+
"resourceType": "ServiceRequest",
|
|
59
|
+
"id": "referral",
|
|
60
|
+
"status": "completed",
|
|
61
|
+
"intent": "order",
|
|
62
|
+
"subject": {
|
|
63
|
+
"reference": "Patient/f56391c2-dd54-b378-46ef-87c1643a2ba0"
|
|
64
|
+
},
|
|
65
|
+
"requester": {
|
|
66
|
+
"reference": "Practitioner/820ee8ba-855a-3aaf-9eeb-6603cfdaee25"
|
|
67
|
+
},
|
|
68
|
+
"performer": [
|
|
69
|
+
{
|
|
70
|
+
"reference": "Practitioner/820ee8ba-855a-3aaf-9eeb-6603cfdaee25"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"identifier": [
|
|
76
|
+
{
|
|
77
|
+
"system": "https://bluebutton.cms.gov/resources/variables/clm_id",
|
|
78
|
+
"value": "c145d3fe-d56e-dc26-75e9-01e90672f506"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"system": "https://bluebutton.cms.gov/resources/identifier/claim-group",
|
|
82
|
+
"value": "99999999999"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"status": "active",
|
|
86
|
+
"type": {
|
|
87
|
+
"coding": [
|
|
88
|
+
{
|
|
89
|
+
"system": "http://terminology.hl7.org/CodeSystem/claim-type",
|
|
90
|
+
"code": "institutional"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"subType": {
|
|
95
|
+
"coding": [
|
|
96
|
+
{
|
|
97
|
+
"system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBInstitutionalClaimSubType",
|
|
98
|
+
"code": "inpatient"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"use": "claim",
|
|
103
|
+
"patient": {
|
|
104
|
+
"reference": "Patient/f56391c2-dd54-b378-46ef-87c1643a2ba0"
|
|
105
|
+
},
|
|
106
|
+
"billablePeriod": {
|
|
107
|
+
"start": "2017-01-05T21:41:04+01:00",
|
|
108
|
+
"end": "2018-01-05T21:41:04+01:00"
|
|
109
|
+
},
|
|
110
|
+
"created": "2017-01-05T21:41:04+01:00",
|
|
111
|
+
"insurer": {
|
|
112
|
+
"display": "Medicaid"
|
|
113
|
+
},
|
|
114
|
+
"provider": {
|
|
115
|
+
"reference": "Practitioner/820ee8ba-855a-3aaf-9eeb-6603cfdaee25"
|
|
116
|
+
},
|
|
117
|
+
"referral": {
|
|
118
|
+
"reference": "#referral"
|
|
119
|
+
},
|
|
120
|
+
"facility": {
|
|
121
|
+
"reference": "Location/e111a884-fc5e-3766-9077-c44100ba56e2",
|
|
122
|
+
"display": "NEWTON-WELLESLEY HOSPITAL"
|
|
123
|
+
},
|
|
124
|
+
"claim": {
|
|
125
|
+
"reference": "Claim/c145d3fe-d56e-dc26-75e9-01e90672f506"
|
|
126
|
+
},
|
|
127
|
+
"outcome": "complete",
|
|
128
|
+
"careTeam": [
|
|
129
|
+
{
|
|
130
|
+
"sequence": 1,
|
|
131
|
+
"provider": {
|
|
132
|
+
"reference": "Practitioner/820ee8ba-855a-3aaf-9eeb-6603cfdaee25"
|
|
133
|
+
},
|
|
134
|
+
"role": {
|
|
135
|
+
"coding": [
|
|
136
|
+
{
|
|
137
|
+
"system": "http://terminology.hl7.org/CodeSystem/claimcareteamrole",
|
|
138
|
+
"code": "primary",
|
|
139
|
+
"display": "Primary Care Practitioner"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"supportingInfo": [
|
|
146
|
+
{
|
|
147
|
+
"sequence": 1,
|
|
148
|
+
"category": {
|
|
149
|
+
"coding": [
|
|
150
|
+
{
|
|
151
|
+
"system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType",
|
|
152
|
+
"code": "clmrecvddate"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"timingDate": "2017-01-05"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"diagnosis": [
|
|
160
|
+
{
|
|
161
|
+
"sequence": 1,
|
|
162
|
+
"diagnosisReference": {
|
|
163
|
+
"reference": "Condition/88bd5ac6-175b-5906-a4ee-6eedd667b0cc"
|
|
164
|
+
},
|
|
165
|
+
"type": [
|
|
166
|
+
{
|
|
167
|
+
"coding": [
|
|
168
|
+
{
|
|
169
|
+
"system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype",
|
|
170
|
+
"code": "principal"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"sequence": 2,
|
|
178
|
+
"type": [
|
|
179
|
+
{
|
|
180
|
+
"coding": [
|
|
181
|
+
{
|
|
182
|
+
"code": "principal",
|
|
183
|
+
"system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype",
|
|
184
|
+
"display": "Principal Diagnosis"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"text": "\"The single medical diagnosis that is most relevant to the patients chief complaint or need for treatment\""
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"onAdmission": {
|
|
191
|
+
"coding": [
|
|
192
|
+
{
|
|
193
|
+
"system": "https://www.nubc.org/CodeSystem/PresentOnAdmissionIndicator"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"diagnosisCodeableConcept": {
|
|
198
|
+
"coding": [
|
|
199
|
+
{
|
|
200
|
+
"code": "Z96.651",
|
|
201
|
+
"system": "http://hl7.org/fhir/sid/icd-10-cm",
|
|
202
|
+
"display": "Presence of right artificial knee joint"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"text": "Presence of right artificial knee joint"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"insurance": [
|
|
210
|
+
{
|
|
211
|
+
"focal": true,
|
|
212
|
+
"coverage": {
|
|
213
|
+
"display": "Medicaid"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"item": [
|
|
218
|
+
{
|
|
219
|
+
"sequence": 1,
|
|
220
|
+
"category": {
|
|
221
|
+
"coding": [
|
|
222
|
+
{
|
|
223
|
+
"system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd",
|
|
224
|
+
"code": "1",
|
|
225
|
+
"display": "Medical care"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"productOrService": {
|
|
230
|
+
"coding": [
|
|
231
|
+
{
|
|
232
|
+
"system": "http://snomed.info/sct",
|
|
233
|
+
"code": "185345009",
|
|
234
|
+
"display": "Encounter for symptom"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"text": "Encounter for symptom"
|
|
238
|
+
},
|
|
239
|
+
"servicedPeriod": {
|
|
240
|
+
"start": "2017-01-05T21:26:04+01:00",
|
|
241
|
+
"end": "2017-01-05T21:41:04+01:00"
|
|
242
|
+
},
|
|
243
|
+
"locationCodeableConcept": {
|
|
244
|
+
"coding": [
|
|
245
|
+
{
|
|
246
|
+
"system": "http://terminology.hl7.org/CodeSystem/ex-serviceplace",
|
|
247
|
+
"code": "21",
|
|
248
|
+
"display": "Inpatient Hospital"
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
"encounter": [
|
|
253
|
+
{
|
|
254
|
+
"reference": "Encounter/97e2c68b-c5e6-02f3-867b-f9f207badd64"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"sequence": 2,
|
|
260
|
+
"diagnosisSequence": [1],
|
|
261
|
+
"category": {
|
|
262
|
+
"coding": [
|
|
263
|
+
{
|
|
264
|
+
"system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd",
|
|
265
|
+
"code": "1",
|
|
266
|
+
"display": "Medical care"
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
"productOrService": {
|
|
271
|
+
"coding": [
|
|
272
|
+
{
|
|
273
|
+
"system": "http://snomed.info/sct",
|
|
274
|
+
"code": "10509002",
|
|
275
|
+
"display": "Acute bronchitis (disorder)"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"text": "Acute bronchitis (disorder)"
|
|
279
|
+
},
|
|
280
|
+
"servicedPeriod": {
|
|
281
|
+
"start": "2017-01-05T21:26:04+01:00",
|
|
282
|
+
"end": "2017-01-05T21:41:04+01:00"
|
|
283
|
+
},
|
|
284
|
+
"locationCodeableConcept": {
|
|
285
|
+
"coding": [
|
|
286
|
+
{
|
|
287
|
+
"system": "http://terminology.hl7.org/CodeSystem/ex-serviceplace",
|
|
288
|
+
"code": "21",
|
|
289
|
+
"display": "Inpatient Hospital"
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"sequence": 3,
|
|
296
|
+
"category": {
|
|
297
|
+
"coding": [
|
|
298
|
+
{
|
|
299
|
+
"system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd",
|
|
300
|
+
"code": "1",
|
|
301
|
+
"display": "Medical care"
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"productOrService": {
|
|
306
|
+
"coding": [
|
|
307
|
+
{
|
|
308
|
+
"system": "http://snomed.info/sct",
|
|
309
|
+
"code": "23426006",
|
|
310
|
+
"display": "Measurement of respiratory function (procedure)"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"text": "Measurement of respiratory function (procedure)"
|
|
314
|
+
},
|
|
315
|
+
"servicedPeriod": {
|
|
316
|
+
"start": "2017-01-05T21:26:04+01:00",
|
|
317
|
+
"end": "2017-01-05T21:41:04+01:00"
|
|
318
|
+
},
|
|
319
|
+
"locationCodeableConcept": {
|
|
320
|
+
"coding": [
|
|
321
|
+
{
|
|
322
|
+
"system": "http://terminology.hl7.org/CodeSystem/ex-serviceplace",
|
|
323
|
+
"code": "21",
|
|
324
|
+
"display": "Inpatient Hospital"
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"net": {
|
|
329
|
+
"value": 146.42,
|
|
330
|
+
"currency": "USD"
|
|
331
|
+
},
|
|
332
|
+
"adjudication": [
|
|
333
|
+
{
|
|
334
|
+
"category": {
|
|
335
|
+
"coding": [
|
|
336
|
+
{
|
|
337
|
+
"system": "https://bluebutton.cms.gov/resources/codesystem/adjudication",
|
|
338
|
+
"code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt",
|
|
339
|
+
"display": "Line Beneficiary Coinsurance Amount"
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
"amount": {
|
|
344
|
+
"value": 29.284,
|
|
345
|
+
"currency": "USD"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"category": {
|
|
350
|
+
"coding": [
|
|
351
|
+
{
|
|
352
|
+
"system": "https://bluebutton.cms.gov/resources/codesystem/adjudication",
|
|
353
|
+
"code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt",
|
|
354
|
+
"display": "Line Provider Payment Amount"
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
"amount": {
|
|
359
|
+
"value": 117.136,
|
|
360
|
+
"currency": "USD"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"category": {
|
|
365
|
+
"coding": [
|
|
366
|
+
{
|
|
367
|
+
"system": "https://bluebutton.cms.gov/resources/codesystem/adjudication",
|
|
368
|
+
"code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt",
|
|
369
|
+
"display": "Line Submitted Charge Amount"
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"amount": {
|
|
374
|
+
"value": 146.42,
|
|
375
|
+
"currency": "USD"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"category": {
|
|
380
|
+
"coding": [
|
|
381
|
+
{
|
|
382
|
+
"system": "https://bluebutton.cms.gov/resources/codesystem/adjudication",
|
|
383
|
+
"code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt",
|
|
384
|
+
"display": "Line Allowed Charge Amount"
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
"amount": {
|
|
389
|
+
"value": 146.42,
|
|
390
|
+
"currency": "USD"
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"category": {
|
|
395
|
+
"coding": [
|
|
396
|
+
{
|
|
397
|
+
"system": "https://bluebutton.cms.gov/resources/codesystem/adjudication",
|
|
398
|
+
"code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt",
|
|
399
|
+
"display": "Line Beneficiary Part B Deductible Amount"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
"amount": {
|
|
404
|
+
"value": 0,
|
|
405
|
+
"currency": "USD"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"category": {
|
|
410
|
+
"coding": [
|
|
411
|
+
{
|
|
412
|
+
"system": "https://bluebutton.cms.gov/resources/codesystem/adjudication",
|
|
413
|
+
"code": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd",
|
|
414
|
+
"display": "Line Processing Indicator Code"
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"total": [
|
|
423
|
+
{
|
|
424
|
+
"category": {
|
|
425
|
+
"coding": [
|
|
426
|
+
{
|
|
427
|
+
"system": "http://terminology.hl7.org/CodeSystem/adjudication",
|
|
428
|
+
"code": "submitted",
|
|
429
|
+
"display": "Submitted Amount"
|
|
430
|
+
}
|
|
431
|
+
],
|
|
432
|
+
"text": "Submitted Amount"
|
|
433
|
+
},
|
|
434
|
+
"amount": {
|
|
435
|
+
"value": 77.49,
|
|
436
|
+
"currency": "USD"
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"payment": {
|
|
441
|
+
"amount": {
|
|
442
|
+
"value": 117.136,
|
|
443
|
+
"currency": "USD"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
2
|
+
import './style.css';
|
|
3
|
+
|
|
1
4
|
import FhirResource from './components/containers/FhirResource';
|
|
2
5
|
import fhirVersions from './components/resources/fhirResourceVersions';
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
if (typeof document !== 'undefined') {
|
|
8
|
+
require('bootstrap/dist/js/bootstrap.min.js');
|
|
9
|
+
}
|
|
5
10
|
|
|
6
11
|
export { FhirResource, fhirVersions };
|
|
7
12
|
export * from './components/supportedFhirResourceList';
|
package/src/style.scss
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
@use 'components/ui/header';
|
|
2
|
+
|
|
3
|
+
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;600&display=swap');
|
|
4
|
+
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600&display=swap');
|
|
5
|
+
@import 'node_modules/bootstrap/scss/functions';
|
|
6
|
+
@import 'node_modules/bootstrap/scss/variables';
|
|
7
|
+
@import 'node_modules/bootstrap/scss/mixins';
|
|
8
|
+
@import 'bootstrap/scss/utilities';
|
|
9
|
+
|
|
10
|
+
$utilities: (
|
|
11
|
+
'font-family': (
|
|
12
|
+
property: font-family,
|
|
13
|
+
class: font,
|
|
14
|
+
values: (
|
|
15
|
+
monospace: var(--#{$variable-prefix}font-monospace),
|
|
16
|
+
source: Source Sans Pro,
|
|
17
|
+
),
|
|
18
|
+
),
|
|
19
|
+
'width': (
|
|
20
|
+
property: width,
|
|
21
|
+
class: w,
|
|
22
|
+
values: (
|
|
23
|
+
25: 25%,
|
|
24
|
+
50: 50%,
|
|
25
|
+
75: 75%,
|
|
26
|
+
90: 90%,
|
|
27
|
+
100: 100%,
|
|
28
|
+
auto: auto,
|
|
29
|
+
max-content: max-content,
|
|
30
|
+
144: 144px,
|
|
31
|
+
110: 110px,
|
|
32
|
+
),
|
|
33
|
+
),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
$space: 0.125rem;
|
|
37
|
+
|
|
38
|
+
$spacers: map-merge(
|
|
39
|
+
$spacers,
|
|
40
|
+
(
|
|
41
|
+
half: $space,
|
|
42
|
+
6: 3.5rem,
|
|
43
|
+
40: 40px,
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
$font-family-base: 'Titillium Web', system-ui;
|
|
48
|
+
|
|
49
|
+
$font-weight-bold: 600;
|
|
50
|
+
|
|
51
|
+
$font-sizes: (
|
|
52
|
+
75: 0.75rem,
|
|
53
|
+
4: 1.125rem,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
$line-height-lg: 1.75;
|
|
57
|
+
$border-radius-lg: 16px;
|
|
58
|
+
$box-shadow-sm: 0 0 24px rgba(0, 11, 79, 0.04);
|
|
59
|
+
|
|
60
|
+
$body-color: #152536;
|
|
61
|
+
|
|
62
|
+
$table-striped-bg: $gray-100;
|
|
63
|
+
|
|
64
|
+
$secondary: #68717A;
|
|
65
|
+
|
|
66
|
+
$light: #dedddd;
|
|
67
|
+
|
|
68
|
+
$enable-negative-margins: true;
|
|
69
|
+
|
|
70
|
+
.header-icon__placeholder {
|
|
71
|
+
background-color: #a3a3a3;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.header-icon__image,
|
|
75
|
+
.header-icon__placeholder {
|
|
76
|
+
width: 24px;
|
|
77
|
+
height: 24px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.header-icon__practitioner-avatar {
|
|
81
|
+
width: 24px;
|
|
82
|
+
height: 24px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dataTable__value-label {
|
|
86
|
+
width: auto;
|
|
87
|
+
@include media-breakpoint-up(sm) {
|
|
88
|
+
width: 130px;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.fhir-ui__Body__data-cell {
|
|
93
|
+
padding-left: 24px !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.fhir-ui__ValueUnitQty {
|
|
97
|
+
font-size: 28px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.fhir-ui__ValueUnit {
|
|
101
|
+
font-size: 18px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.fhir-ui__Badge {
|
|
105
|
+
width: fit-content;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.header__title-row {
|
|
109
|
+
padding-right: 32px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.chevron:hover {
|
|
113
|
+
background-color: $gray-200;
|
|
114
|
+
border-radius: 4px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@include media-breakpoint-up(sm) {
|
|
118
|
+
.w-90.title-width-sm {
|
|
119
|
+
width: 100% !important;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.w-110.graph-width-sm {
|
|
123
|
+
width: 144px !important;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.badges-max-width-sm {
|
|
127
|
+
max-height: 24px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.graph-width-sm {
|
|
131
|
+
width: 200px !important;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// adding custom colors to the theme
|
|
135
|
+
|
|
136
|
+
$theme-colors: map-merge(
|
|
137
|
+
$theme-colors,
|
|
138
|
+
(
|
|
139
|
+
'teal-100': $teal-100,
|
|
140
|
+
'teal-600': $teal-600,
|
|
141
|
+
'yellow-100': $yellow-100,
|
|
142
|
+
'yellow-600': $yellow-600,
|
|
143
|
+
'red-100': $red-100,
|
|
144
|
+
'red-600': $red-600,
|
|
145
|
+
'gray-200': $gray-200,
|
|
146
|
+
'blue-900': $blue-900,
|
|
147
|
+
'orange-100': $orange-100,
|
|
148
|
+
'orange-600': $orange-600,
|
|
149
|
+
'gray-100': $gray-100,
|
|
150
|
+
'gray-500': $gray-500,
|
|
151
|
+
'gray-600': $gray-600,
|
|
152
|
+
'pink-500': $pink-500,
|
|
153
|
+
'indigo-100': $indigo-100,
|
|
154
|
+
'indigo-600': $indigo-600,
|
|
155
|
+
'cyan-100': $cyan-100,
|
|
156
|
+
'cyan-600': $cyan-600,
|
|
157
|
+
'blue-100': $blue-100,
|
|
158
|
+
'blue-600': $blue-600,
|
|
159
|
+
'blue-500': $blue-500,
|
|
160
|
+
'white': $white,
|
|
161
|
+
'secondary': $secondary,
|
|
162
|
+
)
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
// additional sass map merges to enable bg-xxx in 5.1.1
|
|
166
|
+
$theme-colors-rgb: map-loop($theme-colors, to-rgb, '$value');
|
|
167
|
+
$utilities-colors: map-merge($utilities-colors, $theme-colors-rgb);
|
|
168
|
+
$utilities-text-colors: map-loop(
|
|
169
|
+
$utilities-colors,
|
|
170
|
+
rgba-css-var,
|
|
171
|
+
'$key',
|
|
172
|
+
'text'
|
|
173
|
+
);
|
|
174
|
+
$utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, '$key', 'bg');
|
|
175
|
+
|
|
176
|
+
@import '~bootstrap/scss/bootstrap.scss';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const formatDate = (date, locale) => {
|
|
2
|
+
const rawDate = new Date(date);
|
|
3
|
+
const usDate = rawDate.toLocaleDateString(locale, whichOptions(date));
|
|
4
|
+
return usDate;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const whichOptions = date => {
|
|
8
|
+
const YEAR_FORMAT = 'YYYY';
|
|
9
|
+
const YEAR_MONTH_FORMAT = 'YYYY-MM';
|
|
10
|
+
|
|
11
|
+
if (date.length === YEAR_FORMAT.length) {
|
|
12
|
+
return { year: 'numeric' };
|
|
13
|
+
}
|
|
14
|
+
if (date.length <= YEAR_MONTH_FORMAT.length) {
|
|
15
|
+
return {
|
|
16
|
+
year: 'numeric',
|
|
17
|
+
month: 'long',
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return;
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { formatDate } from './formatDate';
|
|
2
|
+
|
|
3
|
+
describe('Date format function', () => {
|
|
4
|
+
const locale = 'en-US';
|
|
5
|
+
|
|
6
|
+
it('should return year', () => {
|
|
7
|
+
const date = '2021';
|
|
8
|
+
expect(formatDate(date, locale)).toEqual('2021');
|
|
9
|
+
});
|
|
10
|
+
it('should return US month and year', () => {
|
|
11
|
+
const date = '2021-03';
|
|
12
|
+
expect(formatDate(date, locale)).toEqual('March 2021');
|
|
13
|
+
});
|
|
14
|
+
it('should return US date format', () => {
|
|
15
|
+
const date = '2021-03-14';
|
|
16
|
+
expect(formatDate(date, locale)).toEqual('3/14/2021');
|
|
17
|
+
});
|
|
18
|
+
it('should return US date format given full timestamp', () => {
|
|
19
|
+
const date = '2021-03-14T13:28:17-05:00';
|
|
20
|
+
expect(formatDate(date, locale)).toEqual('3/14/2021');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getBadgeColor } from './getBadgeColor';
|
|
2
|
+
|
|
3
|
+
describe('Badge Color function', () => {
|
|
4
|
+
it('should return two bootstrap classes', () => {
|
|
5
|
+
expect(getBadgeColor({ children: 'active' })).toEqual(
|
|
6
|
+
'bg-teal-100 text-teal-600',
|
|
7
|
+
);
|
|
8
|
+
});
|
|
9
|
+
it('should return generic classes if status is not valid', () => {
|
|
10
|
+
expect(getBadgeColor({ children: 'asdf' })).toEqual(
|
|
11
|
+
'bg-gray-200 text-blue-900',
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
});
|