fhir-react 0.2.4 → 0.3.0

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.
Files changed (135) hide show
  1. package/.github/workflows/publish_npmjs.yml +18 -0
  2. package/.storybook/config.js +9 -3
  3. package/.storybook/presets.js +1 -0
  4. package/.storybook/preview-head.html +4 -0
  5. package/README.md +47 -3
  6. package/package.json +13 -4
  7. package/src/assets/common/chevron-right.svg +3 -0
  8. package/src/assets/containers/AllergyIntolerance/allergy-intolerance.svg +9 -0
  9. package/src/assets/containers/Appointment/appointment.svg +14 -0
  10. package/src/assets/containers/CarePlan/care-plan.svg +10 -0
  11. package/src/assets/containers/CareTeam/care-team.svg +10 -0
  12. package/src/assets/containers/Claim/claim.svg +6 -0
  13. package/src/assets/containers/ClaimResponse/claim-response.svg +7 -0
  14. package/src/assets/containers/Condition/condition.svg +11 -0
  15. package/src/assets/containers/Device/device.svg +8 -0
  16. package/src/assets/containers/DiagnosticReport/diagnostic-report.svg +14 -0
  17. package/src/assets/containers/DocumentReference/document-reference.svg +10 -0
  18. package/src/assets/containers/Encounter/encounter.svg +10 -0
  19. package/src/assets/containers/ExplanationOfBenefit/explanation-of-benefit.svg +3 -0
  20. package/src/assets/containers/FamilyMemberHistory/family-member-history.svg +7 -0
  21. package/src/assets/containers/Goal/goal.svg +11 -0
  22. package/src/assets/containers/Immunization/immunization.svg +7 -0
  23. package/src/assets/containers/List/list.svg +3 -0
  24. package/src/assets/containers/Location/location.svg +4 -0
  25. package/src/assets/containers/Medication/medication.svg +5 -0
  26. package/src/assets/containers/MedicationAdministration/medication-administration.svg +6 -0
  27. package/src/assets/containers/MedicationKnowledge/medication-knowledge.svg +11 -0
  28. package/src/assets/containers/MedicationStatement/medication-statement.svg +5 -0
  29. package/src/assets/containers/Observation/observation.svg +12 -0
  30. package/src/assets/containers/Practitioner/practitioner.svg +5 -0
  31. package/src/assets/containers/Procedure/procedure.svg +9 -0
  32. package/src/assets/containers/Questionnaire/questionnaire.svg +6 -0
  33. package/src/assets/containers/QuestionnaireResponse/questionnaire-response.svg +6 -0
  34. package/src/assets/containers/QustionnaireResponse/questionnaire-response.svg +6 -0
  35. package/src/assets/containers/ResearchStudy/research-study.svg +9 -0
  36. package/src/assets/containers/ResourceCategory/resource-placeholder.svg +3 -0
  37. package/src/components/containers/Accordion/Accordion.js +80 -0
  38. package/src/components/containers/Accordion/Accordion.stories.js +76 -0
  39. package/src/components/containers/Accordion/index.js +3 -0
  40. package/src/components/containers/ResourceContainer/ResourceContainer.css +0 -1
  41. package/src/components/containers/ResourceContainer/ResourceContainer.js +1 -1
  42. package/src/components/datatypes/AccountBalance/AccountBalance.js +33 -0
  43. package/src/components/datatypes/AccountBalance/index.js +3 -0
  44. package/src/components/datatypes/Annotation/Annotation.js +1 -1
  45. package/src/components/datatypes/Date/Date.js +14 -4
  46. package/src/components/datatypes/DatePeriod/DatePeriod.js +38 -0
  47. package/src/components/datatypes/DatePeriod/index.js +3 -0
  48. package/src/components/datatypes/HeaderIcon/HeaderIcon.js +31 -0
  49. package/src/components/datatypes/HeaderIcon/index.js +3 -0
  50. package/src/components/datatypes/HumanName/HumanName.js +6 -21
  51. package/src/components/datatypes/Reference/Reference.js +3 -6
  52. package/src/components/resources/AdverseEvent/AdverseEvent.test.js +2 -2
  53. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.test.js +4 -4
  54. package/src/components/resources/Appointment/Appointment.js +91 -65
  55. package/src/components/resources/Appointment/Appointment.test.js +3 -3
  56. package/src/components/resources/Bundle/Bundle.js +2 -2
  57. package/src/components/resources/Bundle/Bundle.stories.js +78 -12
  58. package/src/components/resources/Bundle/Bundle.test.js +3 -0
  59. package/src/components/resources/CarePlan/CarePlan.test.js +4 -4
  60. package/src/components/resources/CareTeam/CareTeam.js +13 -14
  61. package/src/components/resources/CareTeam/CareTeam.test.js +4 -4
  62. package/src/components/resources/Claim/Claim.test.js +6 -6
  63. package/src/components/resources/ClaimResponse/ClaimResponse.test.js +6 -6
  64. package/src/components/resources/Condition/Condition.js +63 -47
  65. package/src/components/resources/Condition/Condition.stories.js +41 -8
  66. package/src/components/resources/Condition/Condition.test.js +20 -14
  67. package/src/components/resources/DiagnosticReport/DiagnosticReport.test.js +5 -7
  68. package/src/components/resources/DocumentReference/DocumentReference.js +1 -1
  69. package/src/components/resources/DocumentReference/DocumentReference.test.js +3 -3
  70. package/src/components/resources/Encounter/Encounter.js +66 -36
  71. package/src/components/resources/Encounter/EncounterParticipants.js +2 -2
  72. package/src/components/resources/ExplanationOfBenefit/CareTeam.js +2 -2
  73. package/src/components/resources/ExplanationOfBenefit/Diagnosis.js +15 -5
  74. package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.js +272 -201
  75. package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.test.js +79 -62
  76. package/src/components/resources/ExplanationOfBenefit/Items.js +2 -2
  77. package/src/components/resources/ExplanationOfBenefit/PriceLabel.js +20 -0
  78. package/src/components/resources/ExplanationOfBenefit/Related.js +3 -3
  79. package/src/components/resources/ExplanationOfBenefit/SupportingInfo.js +14 -3
  80. package/src/components/resources/ExplanationOfBenefit/TotalGraph.js +68 -0
  81. package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.js +89 -0
  82. package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.stories.js +78 -0
  83. package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.test.js +51 -0
  84. package/src/components/resources/ExplanationOfBenefitGraph/index.js +3 -0
  85. package/src/components/resources/Goal/Goal.test.js +1 -1
  86. package/src/components/resources/Immunization/Immunization.js +125 -94
  87. package/src/components/resources/Immunization/Immunization.stories.js +23 -4
  88. package/src/components/resources/Immunization/Immunization.test.js +17 -12
  89. package/src/components/resources/List/List.test.js +3 -3
  90. package/src/components/resources/MedicationAdministration/MedicationAdministration.test.js +7 -7
  91. package/src/components/resources/MedicationDispense/MedicationDispense.test.js +2 -2
  92. package/src/components/resources/MedicationRequest/MedicationRequest.test.js +4 -4
  93. package/src/components/resources/Observation/Observation.js +72 -54
  94. package/src/components/resources/Observation/Observation.test.js +6 -18
  95. package/src/components/resources/Observation/ObservationGraph.js +159 -55
  96. package/src/components/resources/Observation/ObservationGraph.test.js +47 -26
  97. package/src/components/resources/Patient/Patient.js +77 -87
  98. package/src/components/resources/Patient/Patient.test.js +1 -1
  99. package/src/components/resources/Practitioner/Practitioner.js +80 -60
  100. package/src/components/resources/Practitioner/Practitioner.test.js +4 -4
  101. package/src/components/resources/Procedure/Procedure.js +99 -87
  102. package/src/components/resources/Procedure/Procedure.stories.js +8 -6
  103. package/src/components/resources/Procedure/Procedure.test.js +11 -8
  104. package/src/components/resources/Questionnaire/Questionnaire.test.js +3 -3
  105. package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.test.js +5 -5
  106. package/src/components/resources/ReferralRequest/ReferralRequest.test.js +2 -2
  107. package/src/components/resources/ResearchStudy/ResearchStudy.test.js +1 -1
  108. package/src/components/resources/ResourceCategory/ResourceCategory.js +56 -0
  109. package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +29 -0
  110. package/src/components/resources/ResourceCategory/ResourceCategory.test.js +101 -0
  111. package/src/components/resources/ResourceCategory/index.js +3 -0
  112. package/src/components/ui/_header.scss +3 -0
  113. package/src/components/ui/bootstrap-reboot.min.css +2 -22
  114. package/src/components/ui/index.js +191 -29
  115. package/src/constants/badge-status.jsx +98 -0
  116. package/src/fixtures/dstu2/resources/condition/condition.svg +35 -0
  117. package/src/fixtures/dstu2/resources/immunization/immunization.svg +10 -0
  118. package/src/fixtures/example-icons.jsx +169 -0
  119. package/src/index.js +6 -1
  120. package/src/style.scss +176 -0
  121. package/src/utils/formatDate.js +21 -0
  122. package/src/utils/formatDate.test.js +22 -0
  123. package/src/utils/getBadgeColor.js +6 -0
  124. package/src/utils/getBadgeColor.test.js +14 -0
  125. package/src/utils/isUrl.js +9 -0
  126. package/src/utils/isUrl.test.js +12 -0
  127. package/src/utils.js +7 -0
  128. package/build/bootstrap-reboot.min.css +0 -414
  129. package/build/index.js +0 -15
  130. package/build/style.css +0 -459
  131. package/src/components/datatypes/HumanName/HumanName.css +0 -15
  132. package/src/components/datatypes/Reference/Reference.css +0 -8
  133. package/src/components/resources/Observation/ObservationGraph.css +0 -51
  134. package/src/components/resources/Patient/Patient.css +0 -19
  135. package/src/components/ui/index.css +0 -123
@@ -1,414 +0,0 @@
1
- /* stylelint-disable */
2
-
3
- /*!
4
- * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
5
- * Copyright 2011-2019 The Bootstrap Authors
6
- * Copyright 2011-2019 Twitter, Inc.
7
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
8
- * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
9
- */
10
- .fhir-resource *,
11
- .fhir-resource::after,
12
- .fhir-resource::before {
13
- box-sizing: border-box;
14
- }
15
-
16
- .fhir-resource {
17
- font-family:
18
- -apple-system,
19
- BlinkMacSystemFont,
20
- 'Segoe UI',
21
- Roboto,
22
- 'Helvetica Neue',
23
- Arial,
24
- 'Noto Sans',
25
- sans-serif,
26
- 'Apple Color Emoji',
27
- 'Segoe UI Emoji',
28
- 'Segoe UI Symbol',
29
- 'Noto Color Emoji';
30
- font-size: 1rem;
31
- font-weight: 400;
32
- line-height: 1.5;
33
- color: #212529;
34
- background-color: #fff;
35
- -webkit-text-size-adjust: 100%;
36
- -webkit-tap-highlight-color: transparent;
37
- padding: 1rem;
38
- }
39
-
40
- .fhir-resource [tabindex='-1']:focus:not(:focus-visible) {
41
- outline: 0 !important;
42
- }
43
-
44
- .fhir-resource hr {
45
- margin: 1rem 0;
46
- color: inherit;
47
- background-color: currentColor;
48
- border: 0;
49
- opacity: 0.25;
50
- }
51
-
52
- .fhir-resource hr:not([size]) {
53
- height: 1px;
54
- }
55
-
56
- .fhir-resource h1,
57
- .fhir-resource h2,
58
- .fhir-resource h3,
59
- .fhir-resource h4,
60
- .fhir-resource h5,
61
- .fhir-resource h6 {
62
- margin-top: 0;
63
- margin-bottom: 0.5rem;
64
- font-weight: 500;
65
- line-height: 1.2;
66
- }
67
-
68
- .fhir-resource h1 {
69
- font-size: 2.5rem;
70
- }
71
-
72
- .fhir-resource h2 {
73
- font-size: 2rem;
74
- }
75
-
76
- .fhir-resource h3 {
77
- font-size: 1.75rem;
78
- }
79
-
80
- .fhir-resource h4 {
81
- font-size: 1.5rem;
82
- }
83
-
84
- .fhir-resource h5 {
85
- font-size: 1.25rem;
86
- }
87
-
88
- .fhir-resource h6 {
89
- font-size: 1rem;
90
- }
91
-
92
- .fhir-resource p {
93
- margin-top: 0;
94
- margin-bottom: 1rem;
95
- }
96
-
97
- .fhir-resource abbr[data-original-title],
98
- .fhir-resource abbr[title] {
99
- text-decoration: underline;
100
- -webkit-text-decoration: underline dotted;
101
- text-decoration: underline dotted;
102
- cursor: help;
103
- -webkit-text-decoration-skip-ink: none;
104
- text-decoration-skip-ink: none;
105
- }
106
-
107
- .fhir-resource address {
108
- margin-bottom: 1rem;
109
- font-style: normal;
110
- line-height: inherit;
111
- }
112
-
113
- .fhir-resource ol,
114
- .fhir-resource ul {
115
- padding-left: 2rem;
116
- }
117
-
118
- .fhir-resource dl,
119
- .fhir-resource ol,
120
- .fhir-resource ul {
121
- margin-top: 0;
122
- margin-bottom: 0;
123
- }
124
-
125
- .fhir-resource ol ol,
126
- .fhir-resource ol ul,
127
- .fhir-resource ul ol,
128
- .fhir-resource ul ul {
129
- margin-bottom: 0;
130
- }
131
-
132
- .fhir-resource dt {
133
- font-weight: 700;
134
- }
135
-
136
- .fhir-resource dd {
137
- margin-bottom: 0.5rem;
138
- margin-left: 0;
139
- }
140
-
141
- .fhir-resource blockquote {
142
- margin: 0 0 1rem;
143
- }
144
-
145
- .fhir-resource b,
146
- strong {
147
- font-weight: bolder;
148
- }
149
-
150
- .fhir-resource small {
151
- font-size: 0.875em;
152
- }
153
-
154
- .fhir-resource sub,
155
- sup {
156
- position: relative;
157
- font-size: 0.75em;
158
- line-height: 0;
159
- vertical-align: baseline;
160
- }
161
-
162
- .fhir-resource sub {
163
- bottom: -0.25em;
164
- }
165
-
166
- .fhir-resource sup {
167
- top: -0.5em;
168
- }
169
-
170
- .fhir-resource a {
171
- color: #0d6efd;
172
- text-decoration: none;
173
- }
174
-
175
- .fhir-resource a:hover {
176
- color: #024dbc;
177
- text-decoration: underline;
178
- }
179
-
180
- .fhir-resource a:not([href]),
181
- .fhir-resource a:not([href]):hover {
182
- color: inherit;
183
- text-decoration: none;
184
- }
185
-
186
- .fhir-resource code,
187
- .fhir-resource kbd,
188
- .fhir-resource pre,
189
- .fhir-resource samp {
190
- font-family:
191
- SFMono-Regular,
192
- Menlo,
193
- Monaco,
194
- Consolas,
195
- 'Liberation Mono',
196
- 'Courier New',
197
- monospace;
198
- font-size: 1em;
199
- }
200
-
201
- .fhir-resource pre {
202
- display: block;
203
- margin-top: 0;
204
- margin-bottom: 1rem;
205
- overflow: auto;
206
- font-size: 0.875em;
207
- }
208
-
209
- .fhir-resource pre code {
210
- font-size: inherit;
211
- color: inherit;
212
- word-break: normal;
213
- }
214
-
215
- .fhir-resource code {
216
- font-size: 0.875em;
217
- color: #d63384;
218
- word-wrap: break-word;
219
- }
220
-
221
- .fhir-resource a > code {
222
- color: inherit;
223
- }
224
-
225
- .fhir-resource kbd {
226
- padding: 0.2rem 0.4rem;
227
- font-size: 0.875em;
228
- color: #fff;
229
- background-color: #212529;
230
- border-radius: 0.2rem;
231
- }
232
-
233
- .fhir-resource kbd kbd {
234
- padding: 0;
235
- font-size: 1em;
236
- font-weight: 700;
237
- }
238
-
239
- .fhir-resource figure {
240
- margin: 0 0 1rem;
241
- }
242
-
243
- .fhir-resource img {
244
- vertical-align: middle;
245
- }
246
-
247
- .fhir-resource svg {
248
- overflow: hidden;
249
- vertical-align: middle;
250
- }
251
-
252
- .fhir-resource table {
253
- border-collapse: collapse;
254
- }
255
-
256
- .fhir-resource caption {
257
- padding-top: 0.5rem;
258
- padding-bottom: 0.5rem;
259
- color: #6c757d;
260
- text-align: left;
261
- caption-side: bottom;
262
- }
263
-
264
- .fhir-resource th {
265
- text-align: inherit;
266
- }
267
-
268
- .fhir-resource label {
269
- display: inline-block;
270
- }
271
-
272
- .fhir-resource button {
273
- border-radius: 0;
274
- }
275
-
276
- .fhir-resource button:focus {
277
- outline: 1px dotted;
278
- outline: 5px auto -webkit-focus-ring-color;
279
- }
280
-
281
- .fhir-resource button,
282
- input,
283
- optgroup,
284
- select,
285
- textarea {
286
- margin: 0;
287
- font-family: inherit;
288
- font-size: inherit;
289
- line-height: inherit;
290
- }
291
-
292
- .fhir-resource button,
293
- input {
294
- overflow: visible;
295
- }
296
-
297
- .fhir-resource button,
298
- select {
299
- text-transform: none;
300
- }
301
-
302
- .fhir-resource select {
303
- word-wrap: normal;
304
- }
305
-
306
- .fhir-resource [list]::-webkit-calendar-picker-indicator {
307
- display: none;
308
- }
309
-
310
- .fhir-resource [type='button'],
311
- [type='reset'],
312
- [type='submit'],
313
- button {
314
- -webkit-appearance: button;
315
- }
316
-
317
- .fhir-resource [type='button']:not(:disabled),
318
- [type='reset']:not(:disabled),
319
- [type='submit']:not(:disabled),
320
- button:not(:disabled) {
321
- cursor: pointer;
322
- }
323
-
324
- .fhir-resource ::-moz-focus-inner {
325
- padding: 0;
326
- border-style: none;
327
- }
328
-
329
- .fhir-resource input[type='date'],
330
- input[type='datetime-local'],
331
- input[type='month'],
332
- input[type='time'] {
333
- -webkit-appearance: textfield;
334
- }
335
-
336
- .fhir-resource textarea {
337
- overflow: auto;
338
- resize: vertical;
339
- }
340
-
341
- .fhir-resource fieldset {
342
- min-width: 0;
343
- padding: 0;
344
- margin: 0;
345
- border: 0;
346
- }
347
-
348
- .fhir-resource legend {
349
- float: left;
350
- width: 100%;
351
- padding: 0;
352
- margin-bottom: 0.5rem;
353
- font-size: 1.5rem;
354
- line-height: inherit;
355
- color: inherit;
356
- white-space: normal;
357
- }
358
-
359
- .fhir-resource mark {
360
- padding: 0.2em;
361
- background-color: #fcf8e3;
362
- }
363
-
364
- .fhir-resource progress {
365
- vertical-align: baseline;
366
- }
367
-
368
- .fhir-resource ::-webkit-datetime-edit {
369
- overflow: visible;
370
- line-height: 0;
371
- }
372
-
373
- .fhir-resource [type='search'] {
374
- outline-offset: -2px;
375
- -webkit-appearance: textfield;
376
- }
377
-
378
- .fhir-resource ::-webkit-search-decoration {
379
- -webkit-appearance: none;
380
- }
381
-
382
- .fhir-resource ::-webkit-color-swatch-wrapper {
383
- padding: 0;
384
- }
385
-
386
- .fhir-resource ::-webkit-file-upload-button {
387
- font: inherit;
388
- -webkit-appearance: button;
389
- }
390
-
391
- .fhir-resource output {
392
- display: inline-block;
393
- }
394
-
395
- .fhir-resource summary {
396
- display: list-item;
397
- cursor: pointer;
398
- }
399
-
400
- .fhir-resource template {
401
- display: none;
402
- }
403
-
404
- .fhir-resource main {
405
- display: block;
406
- }
407
-
408
- .fhir-resource [hidden] {
409
- display: none !important;
410
- }
411
-
412
- .overflow-auto {
413
- overflow: auto;
414
- }