fhir-react 0.3.4 → 0.3.7

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 (84) hide show
  1. package/README.md +1 -1
  2. package/build/bootstrap-reboot.min.css +8 -2
  3. package/build/index.js +7 -7
  4. package/build/style.css +6 -6
  5. package/package.json +1 -1
  6. package/src/assets/containers/Binary/binary.svg +9 -0
  7. package/src/assets/containers/Coverage/coverage.svg +4 -0
  8. package/src/assets/containers/MedicationOrder/medication-order.svg +5 -0
  9. package/src/assets/containers/MedicationRequest/medication-request.svg +5 -0
  10. package/src/assets/containers/Organization/organization.svg +5 -0
  11. package/src/assets/containers/ResourceCategory/{resource-placeholder.svg → resource-category.svg} +0 -0
  12. package/src/components/containers/Accordion/Accordion.js +10 -9
  13. package/src/components/datatypes/Annotation/Annotation.js +4 -4
  14. package/src/components/datatypes/Attachment/Attachment.css +5 -0
  15. package/src/components/datatypes/Attachment/Attachment.js +7 -2
  16. package/src/components/datatypes/CodeableConcept/CodeableConcept.css +4 -1
  17. package/src/components/datatypes/Coding/Coding.css +0 -1
  18. package/src/components/datatypes/Identifier/Identifier.js +7 -3
  19. package/src/components/datatypes/Reference/Reference.css +3 -0
  20. package/src/components/datatypes/Reference/Reference.js +7 -1
  21. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.js +86 -77
  22. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.stories.js +12 -1
  23. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.test.js +71 -0
  24. package/src/components/resources/Binary/Binary.js +30 -20
  25. package/src/components/resources/Binary/Binary.stories.js +12 -5
  26. package/src/components/resources/Binary/Binary.test.js +67 -0
  27. package/src/components/resources/CarePlan/CarePlan.js +111 -96
  28. package/src/components/resources/CarePlan/CarePlan.stories.js +31 -5
  29. package/src/components/resources/CarePlan/CarePlan.test.js +74 -2
  30. package/src/components/resources/CarePlan/CarePlanActivity.js +6 -2
  31. package/src/components/resources/Claim/CareTeam.js +55 -0
  32. package/src/components/resources/Claim/Claim.css +2 -11
  33. package/src/components/resources/Claim/Claim.js +157 -309
  34. package/src/components/resources/Claim/Claim.stories.js +37 -5
  35. package/src/components/resources/Claim/Claim.test.js +72 -0
  36. package/src/components/resources/Claim/Diagnosis.js +61 -0
  37. package/src/components/resources/Claim/Insurance.js +58 -0
  38. package/src/components/resources/Claim/Item.js +79 -0
  39. package/src/components/resources/Claim/Items.js +29 -0
  40. package/src/components/resources/Coverage/Coverage.js +96 -69
  41. package/src/components/resources/Coverage/Coverage.stories.js +31 -5
  42. package/src/components/resources/Coverage/Coverage.test.js +75 -3
  43. package/src/components/resources/Device/Device.js +54 -34
  44. package/src/components/resources/Device/Device.stories.js +33 -5
  45. package/src/components/resources/Device/Device.test.js +72 -0
  46. package/src/components/resources/DiagnosticReport/DiagnosticReport.js +53 -43
  47. package/src/components/resources/DiagnosticReport/DiagnosticReport.stories.js +8 -1
  48. package/src/components/resources/DiagnosticReport/DiagnosticReport.test.js +71 -0
  49. package/src/components/resources/DocumentReference/DocumentReference.js +101 -65
  50. package/src/components/resources/DocumentReference/DocumentReference.stories.js +5 -0
  51. package/src/components/resources/DocumentReference/DocumentReference.test.js +71 -0
  52. package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.js +47 -38
  53. package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.stories.js +5 -0
  54. package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.test.js +72 -0
  55. package/src/components/resources/Goal/Goal.js +103 -85
  56. package/src/components/resources/Goal/Goal.stories.js +38 -7
  57. package/src/components/resources/Goal/Goal.test.js +70 -3
  58. package/src/components/resources/Medication/Medication.js +90 -51
  59. package/src/components/resources/Medication/Medication.stories.js +37 -7
  60. package/src/components/resources/Medication/Medication.test.js +77 -3
  61. package/src/components/resources/MedicationKnowledge/MedicationKnowledge.js +1 -1
  62. package/src/components/resources/MedicationOrder/MedicationOrder.js +45 -28
  63. package/src/components/resources/MedicationOrder/MedicationOrder.test.js +67 -0
  64. package/src/components/resources/MedicationRequest/MedicationRequest.js +64 -44
  65. package/src/components/resources/MedicationRequest/MedicationRequest.stories.js +21 -5
  66. package/src/components/resources/MedicationRequest/MedicationRequest.test.js +67 -0
  67. package/src/components/resources/MedicationStatement/MedicationDetails.js +52 -0
  68. package/src/components/resources/MedicationStatement/MedicationDosage.js +46 -0
  69. package/src/components/resources/MedicationStatement/MedicationStatement.js +66 -118
  70. package/src/components/resources/MedicationStatement/MedicationStatement.stories.js +7 -0
  71. package/src/components/resources/MedicationStatement/MedicationStatement.test.js +103 -6
  72. package/src/components/resources/Organization/Organization.js +55 -37
  73. package/src/components/resources/Organization/Organization.stories.js +15 -2
  74. package/src/components/resources/Organization/Organization.test.js +73 -0
  75. package/src/components/resources/ResourceCategory/ResourceCategory.js +7 -12
  76. package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +13 -2
  77. package/src/components/resources/ResourceCategory/ResourceCategory.test.js +77 -18
  78. package/src/components/ui/bootstrap-reboot.min.css +8 -2
  79. package/src/components/ui/index.js +22 -4
  80. package/src/fixtures/example-icons.jsx +46 -11
  81. package/src/style.scss +1 -0
  82. package/src/utils/formatDate.js +6 -4
  83. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.css +0 -4
  84. package/src/components/resources/CarePlan/CarePlan.css +0 -7
@@ -1,22 +1,14 @@
1
- import { Root, Title } from '../../ui';
2
- import HeaderIcon from '../../datatypes/HeaderIcon';
1
+ import { Header, Root } from '../../ui';
3
2
  import React from 'react';
4
3
  import PropTypes from 'prop-types';
5
- import { isUrl } from '../../../utils/isUrl';
6
-
7
- const ResourceCategory = props => {
8
- const { title, itemsCount, fhirIcons } = props;
9
4
 
5
+ const ResourceCategory = ({ title, itemsCount, fhirIcons }) => {
10
6
  const parseNumber = value =>
11
7
  /^[1-9]+\d*$/.test(value) ? Number.parseInt(value) : null;
12
8
 
13
9
  const getItemsCountLabel = () =>
14
10
  `${parsedItemsCount} ${parsedItemsCount === 1 ? 'item' : 'items'}`;
15
11
 
16
- const headerIcon = isUrl(fhirIcons)
17
- ? fhirIcons
18
- : fhirIcons && fhirIcons['ResourceCategory'];
19
-
20
12
  const parsedItemsCount = parseNumber(itemsCount);
21
13
 
22
14
  return (
@@ -26,8 +18,11 @@ const ResourceCategory = props => {
26
18
  className="btn d-flex align-items-center justify-content-between w-100 py-4 px-4 bg-white"
27
19
  >
28
20
  <div className="d-flex gap-2">
29
- <HeaderIcon headerIcon={headerIcon} />
30
- <Title data-testid="title">{title}</Title>
21
+ <Header
22
+ resourceName={'ResourceCategory'}
23
+ title={title}
24
+ icon={fhirIcons}
25
+ />
31
26
  </div>
32
27
  <div className="d-flex gap-2 align-items-center">
33
28
  {parsedItemsCount > 0 && (
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import ResourceCategory from './ResourceCategory';
3
3
  import fhirIcons from '../../../fixtures/example-icons';
4
+ import ResourceCategoryIcon from '../../../assets/containers/ResourceCategory/resource-category.svg';
4
5
 
5
6
  export default { title: 'ResourceCategory' };
6
7
 
@@ -9,7 +10,7 @@ export const ExampleWithAllProperties = () => {
9
10
  <ResourceCategory
10
11
  itemsCount={41}
11
12
  title="Resource name"
12
- fhirIcons={fhirIcons}
13
+ fhirIcons={require('../../../assets/containers/ResourceCategory/resource-category.svg')}
13
14
  />
14
15
  );
15
16
  };
@@ -19,7 +20,7 @@ export const ExampleWith1Item = () => {
19
20
  <ResourceCategory
20
21
  itemsCount={'1'}
21
22
  title="Resource name"
22
- fhirIcons={fhirIcons}
23
+ fhirIcons={ResourceCategoryIcon}
23
24
  />
24
25
  );
25
26
  };
@@ -27,3 +28,13 @@ export const ExampleWith1Item = () => {
27
28
  export const ExampleWithoutItemsCount = () => {
28
29
  return <ResourceCategory title="Resource name" fhirIcons={fhirIcons} />;
29
30
  };
31
+
32
+ export const ExampleWith1ItemAndDisableIcon = () => {
33
+ return (
34
+ <ResourceCategory
35
+ itemsCount={'1'}
36
+ title="Resource name"
37
+ fhirIcons={false}
38
+ />
39
+ );
40
+ };
@@ -5,42 +5,107 @@ import fhirIcons from '../../../fixtures/example-icons';
5
5
  import ResourceCategory from './ResourceCategory';
6
6
 
7
7
  describe('should render ResourceCategory component properly', () => {
8
- const placeholderResource = fhirIcons['ResourceCategory'].props;
8
+ it('component without a fhirIcons props should render a default icon', () => {
9
+ const defaultProps = {
10
+ itemsCount: '41',
11
+ title: 'Resource name',
12
+ };
13
+
14
+ const { getByAltText } = render(<ResourceCategory {...defaultProps} />);
15
+ const headerIcon = getByAltText('resource category');
16
+
17
+ expect(headerIcon.getAttribute('src')).toContain('IMAGE_MOCK');
18
+ });
19
+
20
+ it('component with a false as a fhirIcons props should render a placeholder', () => {
21
+ const defaultProps = {
22
+ itemsCount: '41',
23
+ title: 'Resource name',
24
+ fhirIcons: false,
25
+ };
26
+
27
+ const { getByTestId } = render(<ResourceCategory {...defaultProps} />);
28
+ const headerIcon = getByTestId('placeholder');
29
+
30
+ expect(headerIcon).toBeTruthy();
31
+ });
32
+
33
+ it('component with the img as a fhirIcons props should render an img', () => {
34
+ const defaultProps = {
35
+ itemsCount: '41',
36
+ title: 'Resource name',
37
+ fhirIcons: (
38
+ <img
39
+ src={require('../assets/containers/ResourceCategory/resource-category.svg')}
40
+ alt="resource category"
41
+ />
42
+ ),
43
+ };
44
+
45
+ const { getByAltText } = render(<ResourceCategory {...defaultProps} />);
46
+ const headerIcon = getByAltText('resource category');
47
+
48
+ expect(headerIcon.getAttribute('src')).toContain('IMAGE_MOCK');
49
+ });
50
+
51
+ it('component with the resources object as a fhirIcons props should render an img', () => {
52
+ const defaultProps = {
53
+ itemsCount: '41',
54
+ title: 'Resource name',
55
+ fhirIcons: fhirIcons,
56
+ };
57
+
58
+ const { getByAltText } = render(<ResourceCategory {...defaultProps} />);
59
+ const headerIcon = getByAltText('resource category');
60
+
61
+ expect(headerIcon.getAttribute('src')).toContain('IMAGE_MOCK');
62
+ });
63
+
64
+ it('component with the url as a fhirIcons props should render an img', () => {
65
+ const avatarSrc =
66
+ 'https://www.gravatar.com/avatar/?s=50&r=any&default=identicon&forcedefault=1';
67
+ const defaultProps = {
68
+ itemsCount: '41',
69
+ title: 'Resource name',
70
+ fhirIcons: avatarSrc,
71
+ };
72
+
73
+ const { getByAltText } = render(<ResourceCategory {...defaultProps} />);
74
+ const headerIcon = getByAltText('header icon');
75
+
76
+ expect(headerIcon.getAttribute('src')).toContain(avatarSrc);
77
+ });
9
78
 
10
- it('should render ResourceCategory component with icon and itemsCount > 1 correctly', () => {
79
+ it('should render ResourceCategory component with itemsCount > 1 correctly', () => {
11
80
  const defaultProps = {
12
81
  fhirIcons: fhirIcons,
13
82
  itemsCount: '41',
14
83
  title: 'Resource name',
15
84
  };
16
85
 
17
- const { container, getByTestId, getByAltText } = render(
86
+ const { container, getByTestId } = render(
18
87
  <ResourceCategory {...defaultProps} />,
19
88
  );
20
89
  expect(container).not.toBeNull();
21
90
 
22
91
  expect(getByTestId('itemsCount').textContent).toContain('41 items');
23
92
  expect(getByTestId('title').textContent).toContain('Resource name');
24
- const image = getByAltText(placeholderResource.alt);
25
- expect(image.src).toContain(placeholderResource.src);
26
93
  });
27
94
 
28
- it('should render ResourceCategory component with icon and itemsCount === 1 correctly', () => {
95
+ it('should render ResourceCategory component with itemsCount === 1 correctly', () => {
29
96
  const defaultProps = {
30
97
  fhirIcons: fhirIcons,
31
98
  itemsCount: 1,
32
99
  title: 'Resource name',
33
100
  };
34
101
 
35
- const { container, getByTestId, getByAltText } = render(
102
+ const { container, getByTestId } = render(
36
103
  <ResourceCategory {...defaultProps} />,
37
104
  );
38
105
  expect(container).not.toBeNull();
39
106
 
40
107
  expect(getByTestId('itemsCount').textContent).toContain('1 item');
41
108
  expect(getByTestId('title').textContent).toContain('Resource name');
42
- const image = getByAltText(placeholderResource.alt);
43
- expect(image.src).toContain(placeholderResource.src);
44
109
  });
45
110
 
46
111
  it('should render ResourceCategory correctly with negative number passed as itemsCount', () => {
@@ -50,7 +115,7 @@ describe('should render ResourceCategory component properly', () => {
50
115
  title: 'Resource name',
51
116
  };
52
117
 
53
- const { container, getByTestId, getByAltText, queryByTestId } = render(
118
+ const { container, getByTestId, queryByTestId } = render(
54
119
  <ResourceCategory {...defaultProps} />,
55
120
  );
56
121
  expect(container).not.toBeNull();
@@ -58,8 +123,6 @@ describe('should render ResourceCategory component properly', () => {
58
123
  const item = queryByTestId('itemsCount');
59
124
  expect(item).toBeNull();
60
125
  expect(getByTestId('title').textContent).toContain('Resource name');
61
- const image = getByAltText(placeholderResource.alt);
62
- expect(image.src).toContain(placeholderResource.src);
63
126
  });
64
127
 
65
128
  it('should render ResourceCategory correctly with invalid string passed as itemsCount', () => {
@@ -69,15 +132,13 @@ describe('should render ResourceCategory component properly', () => {
69
132
  title: 'Resource name',
70
133
  };
71
134
 
72
- const { container, getByTestId, getByAltText, queryByTestId } = render(
135
+ const { container, getByTestId, queryByTestId } = render(
73
136
  <ResourceCategory {...defaultProps} />,
74
137
  );
75
138
  expect(container).not.toBeNull();
76
139
  const item = queryByTestId('itemsCount');
77
140
  expect(item).toBeNull();
78
141
  expect(getByTestId('title').textContent).toContain('Resource name');
79
- const image = getByAltText(placeholderResource.alt);
80
- expect(image.src).toContain(placeholderResource.src);
81
142
  });
82
143
 
83
144
  it('should render ResourceCategory correctly with floating point number passed as text in itemsCount', () => {
@@ -87,7 +148,7 @@ describe('should render ResourceCategory component properly', () => {
87
148
  title: 'Resource name',
88
149
  };
89
150
 
90
- const { container, getByTestId, getByAltText, queryByTestId } = render(
151
+ const { container, getByTestId, queryByTestId } = render(
91
152
  <ResourceCategory {...defaultProps} />,
92
153
  );
93
154
  expect(container).not.toBeNull();
@@ -95,7 +156,5 @@ describe('should render ResourceCategory component properly', () => {
95
156
  const item = queryByTestId('itemsCount');
96
157
  expect(item).toBeNull();
97
158
  expect(getByTestId('title').textContent).toContain('Resource name');
98
- const image = getByAltText(placeholderResource.alt);
99
- expect(image.src).toContain(placeholderResource.src);
100
159
  });
101
160
  });
@@ -173,8 +173,14 @@ sup {
173
173
  .fhir-resource kbd,
174
174
  .fhir-resource pre,
175
175
  .fhir-resource samp {
176
- font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
177
- 'Courier New', monospace;
176
+ font-family:
177
+ SFMono-Regular,
178
+ Menlo,
179
+ Monaco,
180
+ Consolas,
181
+ 'Liberation Mono',
182
+ 'Courier New',
183
+ monospace;
178
184
  font-size: 1em;
179
185
  }
180
186
 
@@ -87,7 +87,7 @@ export const Title = props => (
87
87
  export const Badge = props => {
88
88
  return (
89
89
  <small
90
- className={`fhir-ui__Badge text-capitalize d-flex align-items-center px-2 py-1 rounded-1 fw-bold ${getBadgeColor(
90
+ className={`fhir-ui__Badge text-capitalize d-flex align-items-center mx-1 px-2 py-1 rounded-1 fw-bold ${getBadgeColor(
91
91
  props,
92
92
  )}`}
93
93
  data-testid={props['data-testid']}
@@ -128,7 +128,7 @@ export const ValueUnit = props => (
128
128
  export const Body = ({ tableData = [], reverseContent, children }) => (
129
129
  <div className="fhir-ui__Body">
130
130
  {reverseContent ? children : null}
131
- <div className="row">
131
+ <div className="row gap-3">
132
132
  {tableData.map(
133
133
  (value, index) =>
134
134
  value.status && (
@@ -199,10 +199,17 @@ export const TableHeader = props => {
199
199
  );
200
200
  };
201
201
 
202
- export const TableRow = props => <tr>{props.children}</tr>;
202
+ export const TableRow = props => {
203
+ const { children, ...rest } = props;
204
+ return <tr {...rest}>{props.children}</tr>;
205
+ };
203
206
 
204
207
  export const TableCell = props => (
205
- <td className="align-text-top border-0" data-testid={props['data-testid']}>
208
+ <td
209
+ className={`align-middle border-0 ${props.className || ''}`}
210
+ data-testid={props['data-testid']}
211
+ style={props.style}
212
+ >
206
213
  {props.children}
207
214
  </td>
208
215
  );
@@ -225,6 +232,17 @@ export const MissingValue = () => (
225
232
  <span className="fhir-ui__MissingValue">-</span>
226
233
  );
227
234
 
235
+ export const ValueSectionItem = props => {
236
+ return (
237
+ <div className="d-flex flex-column flex-sm-row my-2">
238
+ <div className="dataTable__value-label ps-0">
239
+ <Label>{props.label}</Label>
240
+ </div>
241
+ <Data data-testid={props['data-testid']}>{props.children}</Data>
242
+ </div>
243
+ );
244
+ };
245
+
228
246
  export const NotEnoughData = props => (
229
247
  <div data-testid={props['data-testid']} className="fhir-ui__NotEnoughData">
230
248
  No additional data
@@ -1,6 +1,13 @@
1
1
  import React from 'react';
2
2
 
3
3
  export default {
4
+ Binary: (
5
+ <img
6
+ className="header-icon__image"
7
+ src={require('../assets/containers/Binary/binary.svg')}
8
+ alt="binary"
9
+ />
10
+ ),
4
11
  Condition: (
5
12
  <img
6
13
  className="header-icon__image"
@@ -33,7 +40,7 @@ export default {
33
40
  <img
34
41
  className="header-icon__image"
35
42
  src={require('../assets/containers/AllergyIntolerance/allergy-intolerance.svg')}
36
- alt="sneezing emoji"
43
+ alt="allergy intolerance"
37
44
  />
38
45
  ),
39
46
  Appointment: (
@@ -47,7 +54,7 @@ export default {
47
54
  <img
48
55
  className="header-icon__image"
49
56
  src={require('../assets/containers/CarePlan/care-plan.svg')}
50
- alt="note with a heart"
57
+ alt="care plan"
51
58
  />
52
59
  ),
53
60
  CareTeam: (
@@ -75,21 +82,21 @@ export default {
75
82
  <img
76
83
  className="header-icon__image"
77
84
  src={require('../assets/containers/Device/device.svg')}
78
- alt="computer rack"
85
+ alt="device"
79
86
  />
80
87
  ),
81
88
  DiagnosticReport: (
82
89
  <img
83
90
  className="header-icon__image"
84
91
  src={require('../assets/containers/DiagnosticReport/diagnostic-report.svg')}
85
- alt="note with shapes"
92
+ alt="diagnostic report"
86
93
  />
87
94
  ),
88
95
  DocumentReference: (
89
96
  <img
90
97
  className="header-icon__image"
91
98
  src={require('../assets/containers/DocumentReference/document-reference.svg')}
92
- alt="hand holding a note"
99
+ alt="document reference"
93
100
  />
94
101
  ),
95
102
  Encounter: (
@@ -110,14 +117,14 @@ export default {
110
117
  <img
111
118
  className="header-icon__image"
112
119
  src={require('../assets/containers/FamilyMemberHistory/family-member-history.svg')}
113
- alt="parent and child"
120
+ alt="family member history"
114
121
  />
115
122
  ),
116
123
  Goal: (
117
124
  <img
118
125
  className="header-icon__image"
119
126
  src={require('../assets/containers/Goal/goal.svg')}
120
- alt="arrow hits bullseye"
127
+ alt="goal"
121
128
  />
122
129
  ),
123
130
  List: (
@@ -138,7 +145,21 @@ export default {
138
145
  <img
139
146
  className="header-icon__image"
140
147
  src={require('../assets/containers/Medication/medication.svg')}
141
- alt="some pills"
148
+ alt="medication"
149
+ />
150
+ ),
151
+ MedicationOrder: (
152
+ <img
153
+ className="header-icon__image"
154
+ src={require('../assets/containers/MedicationOrder/medication-order.svg')}
155
+ alt="medication order"
156
+ />
157
+ ),
158
+ MedicationRequest: (
159
+ <img
160
+ className="header-icon__image"
161
+ src={require('../assets/containers/MedicationRequest/medication-request.svg')}
162
+ alt="medication request"
142
163
  />
143
164
  ),
144
165
  MedicationAdministration: (
@@ -159,7 +180,7 @@ export default {
159
180
  <img
160
181
  className="header-icon__image"
161
182
  src={require('../assets/containers/MedicationStatement/medication-statement.svg')}
162
- alt="note with symmetrical cross"
183
+ alt="medication statement"
163
184
  />
164
185
  ),
165
186
  Observation: (
@@ -169,6 +190,13 @@ export default {
169
190
  alt="observation"
170
191
  />
171
192
  ),
193
+ Organization: (
194
+ <img
195
+ className="header-icon__image"
196
+ src={require('../assets/containers/Organization/organization.svg')}
197
+ alt="organization"
198
+ />
199
+ ),
172
200
  Questionnaire: (
173
201
  <img
174
202
  className="header-icon__image"
@@ -193,8 +221,8 @@ export default {
193
221
  ResourceCategory: (
194
222
  <img
195
223
  className="header-icon__image"
196
- src={require('../assets/containers/ResourceCategory/resource-placeholder.svg')}
197
- alt="header icon"
224
+ src={require('../assets/containers/ResourceCategory/resource-category.svg')}
225
+ alt="resource category"
198
226
  />
199
227
  ),
200
228
  Patient: (
@@ -204,4 +232,11 @@ export default {
204
232
  alt="patient"
205
233
  />
206
234
  ),
235
+ Coverage: (
236
+ <img
237
+ className="header-icon__image"
238
+ src={require('../assets/containers/Coverage/coverage.svg')}
239
+ alt="coverage"
240
+ />
241
+ ),
207
242
  };
package/src/style.scss CHANGED
@@ -86,6 +86,7 @@ $enable-negative-margins: true;
86
86
  width: auto;
87
87
  @include media-breakpoint-up(sm) {
88
88
  width: 130px;
89
+ min-width: 130px;
89
90
  }
90
91
  }
91
92
 
@@ -1,7 +1,6 @@
1
1
  export const formatDate = (date, locale) => {
2
2
  const rawDate = new Date(date);
3
- const usDate = rawDate.toLocaleDateString(locale, whichOptions(date));
4
- return usDate;
3
+ return rawDate.toLocaleDateString(locale, whichOptions(date));
5
4
  };
6
5
 
7
6
  const whichOptions = date => {
@@ -9,13 +8,16 @@ const whichOptions = date => {
9
8
  const YEAR_MONTH_FORMAT = 'YYYY-MM';
10
9
 
11
10
  if (date.length === YEAR_FORMAT.length) {
12
- return { year: 'numeric' };
11
+ return { year: 'numeric', timeZone: 'UTC' };
13
12
  }
14
13
  if (date.length <= YEAR_MONTH_FORMAT.length) {
15
14
  return {
16
15
  year: 'numeric',
17
16
  month: 'long',
17
+ timeZone: 'UTC',
18
18
  };
19
19
  }
20
- return;
20
+ return {
21
+ timeZone: 'UTC',
22
+ };
21
23
  };
@@ -1,4 +0,0 @@
1
- .fhir-resource__AllergyIntolerance__grouping {
2
- display: flex;
3
- align-items: center;
4
- }
@@ -1,7 +0,0 @@
1
- .fhir-resource__CarePlan__activity {
2
- margin-bottom: 0.5rem;
3
- }
4
-
5
- .fhir-resource__CarePlan__activity-title {
6
- font-weight: bold;
7
- }