fhir-react 0.3.8 → 0.3.11
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/.storybook/main.js +5 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview.js +56 -0
- package/README.md +1 -1
- package/build/index.js +8 -8
- package/build/style.css +2 -2
- package/package.json +5 -4
- package/src/components/containers/Accordion/Accordion.js +24 -1
- package/src/components/containers/Accordion/Accordion.stories.js +74 -58
- package/src/components/containers/ResourceContainer/ResourceContainer.css +4 -0
- package/src/components/containers/ResourceContainer/ResourceContainer.js +28 -37
- package/src/components/containers/ResourceContainer/ResourceContainer.stories.js +46 -22
- package/src/components/defaultArgTypes.js +12 -0
- package/src/components/resources/AdverseEvent/AdverseEvent.js +8 -1
- package/src/components/resources/AdverseEvent/AdverseEvent.stories.js +17 -19
- package/src/components/resources/AllergyIntolerance/AllergyIntolerance.js +2 -0
- package/src/components/resources/AllergyIntolerance/AllergyIntolerance.stories.js +46 -70
- package/src/components/resources/Appointment/Appointment.js +8 -1
- package/src/components/resources/Appointment/Appointment.stories.js +51 -62
- package/src/components/resources/Binary/Binary.js +2 -1
- package/src/components/resources/Binary/Binary.stories.js +27 -21
- package/src/components/resources/Bundle/Bundle.stories.js +59 -49
- package/src/components/resources/CarePlan/CarePlan.js +8 -1
- package/src/components/resources/CarePlan/CarePlan.stories.js +44 -54
- package/src/components/resources/CareTeam/CareTeam.js +8 -1
- package/src/components/resources/CareTeam/CareTeam.stories.js +22 -28
- package/src/components/resources/Claim/Claim.js +8 -1
- package/src/components/resources/Claim/Claim.stories.js +37 -50
- package/src/components/resources/ClaimResponse/ClaimResponse.js +8 -1
- package/src/components/resources/ClaimResponse/ClaimResponse.stories.js +42 -52
- package/src/components/resources/Condition/Condition.js +8 -1
- package/src/components/resources/Condition/Condition.stories.js +47 -62
- package/src/components/resources/Coverage/Coverage.js +8 -1
- package/src/components/resources/Coverage/Coverage.stories.js +38 -50
- package/src/components/resources/Device/Device.js +8 -1
- package/src/components/resources/Device/Device.stories.js +40 -52
- package/src/components/resources/DiagnosticReport/DiagnosticReport.js +2 -0
- package/src/components/resources/DiagnosticReport/DiagnosticReport.stories.js +38 -50
- package/src/components/resources/DocumentReference/DocumentReference.js +2 -0
- package/src/components/resources/DocumentReference/DocumentReference.stories.js +25 -29
- package/src/components/resources/Encounter/Encounter.js +8 -1
- package/src/components/resources/Encounter/Encounter.stories.js +43 -59
- package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.js +2 -0
- package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.stories.js +53 -67
- package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.stories.js +74 -38
- package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.js +2 -0
- package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.stories.js +23 -29
- package/src/components/resources/Generic/Generic.js +2 -1
- package/src/components/resources/Generic/Generic.stories.js +21 -12
- package/src/components/resources/Goal/Goal.js +8 -1
- package/src/components/resources/Goal/Goal.stories.js +35 -49
- package/src/components/resources/Immunization/Immunization.js +8 -1
- package/src/components/resources/Immunization/Immunization.stories.js +38 -51
- package/src/components/resources/List/List.js +2 -0
- package/src/components/resources/List/List.stories.js +66 -70
- package/src/components/resources/Location/Location.js +2 -1
- package/src/components/resources/Location/Location.stories.js +23 -18
- package/src/components/resources/Medication/Medication.js +8 -1
- package/src/components/resources/Medication/Medication.stories.js +42 -64
- package/src/components/resources/MedicationAdministration/MedicationAdministration.js +2 -0
- package/src/components/resources/MedicationAdministration/MedicationAdministration.stories.js +32 -46
- package/src/components/resources/MedicationDispense/MedicationDispense.js +2 -0
- package/src/components/resources/MedicationDispense/MedicationDispense.stories.js +39 -57
- package/src/components/resources/MedicationKnowledge/MedicationKnowledge.js +2 -0
- package/src/components/resources/MedicationKnowledge/MedicationKnowledge.stories.js +49 -58
- package/src/components/resources/MedicationOrder/MedicationOrder.js +2 -1
- package/src/components/resources/MedicationOrder/MedicationOrder.stories.js +11 -4
- package/src/components/resources/MedicationRequest/MedicationRequest.js +7 -1
- package/src/components/resources/MedicationRequest/MedicationRequest.stories.js +27 -30
- package/src/components/resources/MedicationStatement/MedicationStatement.js +2 -0
- package/src/components/resources/MedicationStatement/MedicationStatement.stories.js +32 -46
- package/src/components/resources/Observation/Observation.js +2 -1
- package/src/components/resources/Observation/Observation.stories.js +39 -33
- package/src/components/resources/Observation/ObservationGraph.js +1 -1
- package/src/components/resources/Organization/Organization.js +8 -1
- package/src/components/resources/Organization/Organization.stories.js +40 -52
- package/src/components/resources/Patient/Patient.js +2 -0
- package/src/components/resources/Patient/Patient.stories.js +36 -28
- package/src/components/resources/Practitioner/Practitioner.js +8 -1
- package/src/components/resources/Practitioner/Practitioner.stories.js +39 -52
- package/src/components/resources/PractitionerRole/PractitionerRole.js +2 -0
- package/src/components/resources/PractitionerRole/PractitionerRole.stories.js +43 -63
- package/src/components/resources/Procedure/Procedure.js +2 -1
- package/src/components/resources/Procedure/Procedure.stories.js +33 -25
- package/src/components/resources/Questionnaire/Questionnaire.js +8 -1
- package/src/components/resources/Questionnaire/Questionnaire.stories.js +47 -62
- package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.js +2 -0
- package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.stories.js +43 -63
- package/src/components/resources/ReferralRequest/ReferralRequest.js +8 -1
- package/src/components/resources/ReferralRequest/ReferralRequest.stories.js +20 -20
- package/src/components/resources/RelatedPerson/RelatedPerson.js +8 -1
- package/src/components/resources/RelatedPerson/RelatedPerson.stories.js +26 -30
- package/src/components/resources/ResearchStudy/ResearchStudy.js +8 -1
- package/src/components/resources/ResearchStudy/ResearchStudy.stories.js +17 -15
- package/src/components/resources/ResourceCategory/ResourceCategory.js +1 -1
- package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +40 -27
- package/src/components/supportedFhirResourceList.js +2 -0
- package/src/components/ui/index.js +27 -23
- package/src/style.scss +11 -0
- package/.storybook/addons.js +0 -1
- package/.storybook/config.js +0 -26
- package/.storybook/presets.js +0 -1
|
@@ -98,6 +98,7 @@ const DiagnosticReport = ({
|
|
|
98
98
|
fhirVersion,
|
|
99
99
|
fhirIcons,
|
|
100
100
|
onClick,
|
|
101
|
+
rawOnClick,
|
|
101
102
|
}) => {
|
|
102
103
|
let fhirResourceData = {};
|
|
103
104
|
try {
|
|
@@ -170,6 +171,7 @@ const DiagnosticReport = ({
|
|
|
170
171
|
}
|
|
171
172
|
bodyContent={<Body tableData={tableData} />}
|
|
172
173
|
onClick={onClick}
|
|
174
|
+
rawOnClick={rawOnClick}
|
|
173
175
|
/>
|
|
174
176
|
</Root>
|
|
175
177
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import DiagnosticReport from './DiagnosticReport';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -12,64 +12,52 @@ import example3DiagnosticReportR4 from '../../../fixtures/r4/resources/diagnosti
|
|
|
12
12
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
13
13
|
import DiagnosticReportIcon from '../../../assets/containers/DiagnosticReport/diagnostic-report.svg';
|
|
14
14
|
|
|
15
|
-
export default {
|
|
15
|
+
export default {
|
|
16
|
+
title: 'DiagnosticReport',
|
|
17
|
+
component: DiagnosticReport,
|
|
18
|
+
argTypes: {
|
|
19
|
+
...defaultArgTypes,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const Template = args => <DiagnosticReport {...args} />;
|
|
16
24
|
|
|
17
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
fhirResource={fhirResource}
|
|
23
|
-
fhirIcons={require('../../../assets/containers/DiagnosticReport/diagnostic-report.svg')}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
25
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
26
|
+
DefaultVisualizationDSTU2.args = {
|
|
27
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
28
|
+
fhirResource: exampleDiagnosticReportDSTU2,
|
|
29
|
+
fhirIcons: require('../../../assets/containers/DiagnosticReport/diagnostic-report.svg'),
|
|
26
30
|
};
|
|
27
31
|
|
|
28
|
-
export const ExampleDiagnosticReportSTU3 = ()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
fhirResource={fhirResource}
|
|
34
|
-
fhirIcons={DiagnosticReportIcon}
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
32
|
+
export const ExampleDiagnosticReportSTU3 = Template.bind({});
|
|
33
|
+
ExampleDiagnosticReportSTU3.args = {
|
|
34
|
+
fhirVersion: fhirVersions.STU3,
|
|
35
|
+
fhirResource: exampleDiagnosticReportSTU3,
|
|
36
|
+
fhirIcons: DiagnosticReportIcon,
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export const ExampleDiagnosticReportR4 = ()
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
fhirResource={fhirResource}
|
|
45
|
-
fhirIcons={fhirIcons}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
39
|
+
export const ExampleDiagnosticReportR4 = Template.bind({});
|
|
40
|
+
ExampleDiagnosticReportR4.args = {
|
|
41
|
+
fhirVersion: fhirVersions.R4,
|
|
42
|
+
fhirResource: exampleDiagnosticReportR4,
|
|
43
|
+
fhirIcons: fhirIcons,
|
|
48
44
|
};
|
|
49
45
|
|
|
50
|
-
export const Example2DiagnosticReportR4 = ()
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
fhirResource={fhirResource}
|
|
56
|
-
fhirIcons={false}
|
|
57
|
-
/>
|
|
58
|
-
);
|
|
46
|
+
export const Example2DiagnosticReportR4 = Template.bind({});
|
|
47
|
+
Example2DiagnosticReportR4.args = {
|
|
48
|
+
fhirVersion: fhirVersions.R4,
|
|
49
|
+
fhirResource: example2DiagnosticReportR4,
|
|
50
|
+
fhirIcons: false,
|
|
59
51
|
};
|
|
60
52
|
|
|
61
|
-
export const Example3DiagnosticReportR4 = ()
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
fhirResource={fhirResource}
|
|
67
|
-
fhirIcons={'random text'}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
53
|
+
export const Example3DiagnosticReportR4 = Template.bind({});
|
|
54
|
+
Example3DiagnosticReportR4.args = {
|
|
55
|
+
fhirVersion: fhirVersions.R4,
|
|
56
|
+
fhirResource: example3DiagnosticReportR4,
|
|
57
|
+
fhirIcons: 'random text',
|
|
70
58
|
};
|
|
71
59
|
|
|
72
|
-
export const ExampleWithoutFhirVersionProperty = ()
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
export const ExampleWithoutFhirVersionProperty = Template.bind({});
|
|
61
|
+
ExampleWithoutFhirVersionProperty.args = {
|
|
62
|
+
fhirResource: exampleDiagnosticReportSTU3,
|
|
75
63
|
};
|
|
@@ -221,6 +221,7 @@ const DocumentReference = ({
|
|
|
221
221
|
fhirResource,
|
|
222
222
|
fhirIcons,
|
|
223
223
|
onClick,
|
|
224
|
+
rawOnClick,
|
|
224
225
|
}) => {
|
|
225
226
|
let fhirResourceData = {};
|
|
226
227
|
try {
|
|
@@ -342,6 +343,7 @@ const DocumentReference = ({
|
|
|
342
343
|
</Body>
|
|
343
344
|
}
|
|
344
345
|
onClick={onClick}
|
|
346
|
+
rawOnClick={rawOnClick}
|
|
345
347
|
/>
|
|
346
348
|
</Root>
|
|
347
349
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import fhirVersions from '../fhirResourceVersions';
|
|
5
5
|
import DocumentReference from './DocumentReference';
|
|
@@ -10,37 +10,33 @@ import example1DocumentReferenceR4 from '../../../fixtures/r4/resources/document
|
|
|
10
10
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
11
11
|
import DocumentReferenceIcon from '../../../assets/containers/DocumentReference/document-reference.svg';
|
|
12
12
|
|
|
13
|
-
export default {
|
|
13
|
+
export default {
|
|
14
|
+
title: 'DocumentReference',
|
|
15
|
+
component: DocumentReference,
|
|
16
|
+
argTypes: {
|
|
17
|
+
...defaultArgTypes,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Template = args => <DocumentReference {...args} />;
|
|
14
22
|
|
|
15
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
21
|
-
fhirIcons={require('../../../assets/containers/DocumentReference/document-reference.svg')}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
23
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
24
|
+
DefaultVisualizationDSTU2.args = {
|
|
25
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
26
|
+
fhirResource: exampleDocumentReference,
|
|
27
|
+
fhirIcons: require('../../../assets/containers/DocumentReference/document-reference.svg'),
|
|
24
28
|
};
|
|
25
29
|
|
|
26
|
-
export const ExampleSTU3 = ()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fhirVersion={fhirVersions.STU3}
|
|
32
|
-
fhirIcons={DocumentReferenceIcon}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
30
|
+
export const ExampleSTU3 = Template.bind({});
|
|
31
|
+
ExampleSTU3.args = {
|
|
32
|
+
fhirVersion: fhirVersions.STU3,
|
|
33
|
+
fhirResource: exampleDocumentReferenceSTU3,
|
|
34
|
+
fhirIcons: DocumentReferenceIcon,
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
export const ExampleR4 = ()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fhirVersion={fhirVersions.R4}
|
|
43
|
-
fhirIcons={fhirIcons}
|
|
44
|
-
/>
|
|
45
|
-
);
|
|
37
|
+
export const ExampleR4 = Template.bind({});
|
|
38
|
+
ExampleR4.args = {
|
|
39
|
+
fhirVersion: fhirVersions.R4,
|
|
40
|
+
fhirResource: example1DocumentReferenceR4,
|
|
41
|
+
fhirIcons: fhirIcons,
|
|
46
42
|
};
|
|
@@ -160,7 +160,13 @@ const resourceDTO = (fhirVersion, fhirResource) => {
|
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
const Encounter = ({
|
|
163
|
+
const Encounter = ({
|
|
164
|
+
fhirResource,
|
|
165
|
+
fhirVersion,
|
|
166
|
+
fhirIcons,
|
|
167
|
+
onClick,
|
|
168
|
+
rawOnClick,
|
|
169
|
+
}) => {
|
|
164
170
|
let fhirResourceData = {};
|
|
165
171
|
try {
|
|
166
172
|
fhirResourceData = resourceDTO(fhirVersion, fhirResource);
|
|
@@ -230,6 +236,7 @@ const Encounter = ({ fhirResource, fhirVersion, fhirIcons, onClick }) => {
|
|
|
230
236
|
</Body>
|
|
231
237
|
}
|
|
232
238
|
onClick={onClick}
|
|
239
|
+
rawOnClick={rawOnClick}
|
|
233
240
|
/>
|
|
234
241
|
</Root>
|
|
235
242
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Encounter from './Encounter';
|
|
5
5
|
|
|
@@ -16,78 +16,62 @@ import EncounterIcon from '../../../assets/containers/Encounter/encounter.svg';
|
|
|
16
16
|
|
|
17
17
|
export default {
|
|
18
18
|
title: 'Encounter',
|
|
19
|
+
component: Encounter,
|
|
20
|
+
argTypes: {
|
|
21
|
+
...defaultArgTypes,
|
|
22
|
+
},
|
|
19
23
|
};
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
25
|
+
const Template = args => <Encounter {...args} />;
|
|
26
|
+
|
|
27
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
28
|
+
DefaultVisualizationDSTU2.args = {
|
|
29
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
30
|
+
fhirResource: example1,
|
|
31
|
+
fhirIcons: require('../../../assets/containers/Encounter/encounter.svg'),
|
|
30
32
|
};
|
|
31
33
|
|
|
32
|
-
export const ExampleWithoutParticipantsDSTU2 = ()
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fhirResource={fhirResource}
|
|
38
|
-
fhirIcons={EncounterIcon}
|
|
39
|
-
/>
|
|
40
|
-
);
|
|
34
|
+
export const ExampleWithoutParticipantsDSTU2 = Template.bind({});
|
|
35
|
+
ExampleWithoutParticipantsDSTU2.args = {
|
|
36
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
37
|
+
fhirResource: example2,
|
|
38
|
+
fhirIcons: EncounterIcon,
|
|
41
39
|
};
|
|
42
40
|
|
|
43
|
-
export const ExampleSTU3 = ()
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
fhirResource={fhirResource}
|
|
49
|
-
fhirIcons={fhirIcons}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
41
|
+
export const ExampleSTU3 = Template.bind({});
|
|
42
|
+
ExampleSTU3.args = {
|
|
43
|
+
fhirVersion: fhirVersions.STU3,
|
|
44
|
+
fhirResource: example_STU3,
|
|
45
|
+
fhirIcons: fhirIcons,
|
|
52
46
|
};
|
|
53
47
|
|
|
54
|
-
export const ExampleWithoutParticipantSTU3 = ()
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
fhirResource={fhirResource}
|
|
60
|
-
fhirIcons={false}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
48
|
+
export const ExampleWithoutParticipantSTU3 = Template.bind({});
|
|
49
|
+
ExampleWithoutParticipantSTU3.args = {
|
|
50
|
+
fhirVersion: fhirVersions.STU3,
|
|
51
|
+
fhirResource: example2_STU3,
|
|
52
|
+
fhirIcons: false,
|
|
63
53
|
};
|
|
64
54
|
|
|
65
|
-
export const ExampleWithoutParticipantR4 = ()
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
fhirResource={fhirResource}
|
|
71
|
-
fhirIcons={'random text'}
|
|
72
|
-
/>
|
|
73
|
-
);
|
|
55
|
+
export const ExampleWithoutParticipantR4 = Template.bind({});
|
|
56
|
+
ExampleWithoutParticipantR4.args = {
|
|
57
|
+
fhirVersion: fhirVersions.R4,
|
|
58
|
+
fhirResource: example1_R4,
|
|
59
|
+
fhirIcons: 'random text',
|
|
74
60
|
};
|
|
75
61
|
|
|
76
|
-
export const Example2ofR4 = ()
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
62
|
+
export const Example2ofR4 = Template.bind({});
|
|
63
|
+
Example2ofR4.args = {
|
|
64
|
+
fhirVersion: fhirVersions.R4,
|
|
65
|
+
fhirResource: example2_R4,
|
|
81
66
|
};
|
|
82
67
|
|
|
83
|
-
export const Example3ofR4 = ()
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
);
|
|
68
|
+
export const Example3ofR4 = Template.bind({});
|
|
69
|
+
Example3ofR4.args = {
|
|
70
|
+
fhirVersion: fhirVersions.R4,
|
|
71
|
+
fhirResource: example3_R4,
|
|
88
72
|
};
|
|
89
73
|
|
|
90
|
-
export const ExampleWithoutFHIRVersionProperty = ()
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
export const ExampleWithoutFHIRVersionProperty = Template.bind({});
|
|
75
|
+
ExampleWithoutFHIRVersionProperty.args = {
|
|
76
|
+
fhirResource: example2_STU3,
|
|
93
77
|
};
|
|
@@ -234,6 +234,7 @@ const ExplanationOfBenefit = ({
|
|
|
234
234
|
withCarinBBProfile = false,
|
|
235
235
|
fhirIcons,
|
|
236
236
|
onClick,
|
|
237
|
+
rawOnClick,
|
|
237
238
|
}) => {
|
|
238
239
|
let fhirResourceData = {};
|
|
239
240
|
try {
|
|
@@ -548,6 +549,7 @@ const ExplanationOfBenefit = ({
|
|
|
548
549
|
</Body>
|
|
549
550
|
}
|
|
550
551
|
onClick={onClick}
|
|
552
|
+
rawOnClick={rawOnClick}
|
|
551
553
|
/>
|
|
552
554
|
</Root>
|
|
553
555
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import ExplanationOfBenefit from './ExplanationOfBenefit';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -17,83 +17,69 @@ import ExplanationOfBenefitIcon from '../../../assets/containers/ExplanationOfBe
|
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
19
|
title: 'ExplanationOfBenefit',
|
|
20
|
+
component: ExplanationOfBenefit,
|
|
21
|
+
argTypes: {
|
|
22
|
+
...defaultArgTypes,
|
|
23
|
+
withCarinBBProfile: {
|
|
24
|
+
table: {
|
|
25
|
+
disable: true,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
20
29
|
};
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
+
const Template = args => <ExplanationOfBenefit {...args} />;
|
|
32
|
+
|
|
33
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
34
|
+
DefaultVisualizationDSTU2.args = {
|
|
35
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
36
|
+
fhirResource: example1Dstu2,
|
|
37
|
+
fhirIcons: require('../../../assets/containers/ExplanationOfBenefit/explanation-of-benefit.svg'),
|
|
31
38
|
};
|
|
32
39
|
|
|
33
|
-
export const ExampleSTU3 = ()
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
fhirResource={fhirResource}
|
|
39
|
-
fhirIcons={ExplanationOfBenefitIcon}
|
|
40
|
-
/>
|
|
41
|
-
);
|
|
40
|
+
export const ExampleSTU3 = Template.bind({});
|
|
41
|
+
ExampleSTU3.args = {
|
|
42
|
+
fhirVersion: fhirVersions.STU3,
|
|
43
|
+
fhirResource: example1Stu3,
|
|
44
|
+
fhirIcons: ExplanationOfBenefitIcon,
|
|
42
45
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
fhirIcons={fhirIcons}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
46
|
+
|
|
47
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
48
|
+
Example2OfSTU3.args = {
|
|
49
|
+
fhirVersion: fhirVersions.STU3,
|
|
50
|
+
fhirResource: example2Stu3,
|
|
51
|
+
fhirIcons: fhirIcons,
|
|
52
52
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
fhirIcons={false}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
53
|
+
|
|
54
|
+
export const PersonPrimaryCoverageR4 = Template.bind({});
|
|
55
|
+
PersonPrimaryCoverageR4.args = {
|
|
56
|
+
fhirVersion: fhirVersions.R4,
|
|
57
|
+
fhirResource: example1R4,
|
|
58
|
+
fhirIcons: false,
|
|
62
59
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
fhirIcons={'random text'}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
60
|
+
|
|
61
|
+
export const EOBForClaimWithErrorsR4 = Template.bind({});
|
|
62
|
+
EOBForClaimWithErrorsR4.args = {
|
|
63
|
+
fhirVersion: fhirVersions.R4,
|
|
64
|
+
fhirResource: example2R4,
|
|
65
|
+
fhirIcons: 'random text',
|
|
72
66
|
};
|
|
73
67
|
|
|
74
|
-
export const ExampleWithoutFHIRVersionProperty = ()
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
export const ExampleWithoutFHIRVersionProperty = Template.bind({});
|
|
69
|
+
ExampleWithoutFHIRVersionProperty.args = {
|
|
70
|
+
fhirResource: example1Stu3,
|
|
77
71
|
};
|
|
78
72
|
|
|
79
|
-
export const EOBCarinBlueButtonExample = ()
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
fhirResource={fhirResource}
|
|
85
|
-
withCarinBBProfile
|
|
86
|
-
/>
|
|
87
|
-
);
|
|
73
|
+
export const EOBCarinBlueButtonExample = Template.bind({});
|
|
74
|
+
EOBCarinBlueButtonExample.args = {
|
|
75
|
+
fhirVersion: fhirVersions.R4,
|
|
76
|
+
fhirResource: exampleC4BB,
|
|
77
|
+
withCarinBBProfile: true,
|
|
88
78
|
};
|
|
89
79
|
|
|
90
|
-
export const EOBCarinBlueButtonExtendedDiagnosis = ()
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
fhirResource={fhirResource}
|
|
96
|
-
withCarinBBProfile
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
80
|
+
export const EOBCarinBlueButtonExtendedDiagnosis = Template.bind({});
|
|
81
|
+
EOBCarinBlueButtonExtendedDiagnosis.args = {
|
|
82
|
+
fhirVersion: fhirVersions.R4,
|
|
83
|
+
fhirResource: exampleC4BBExtendedDiagnosis,
|
|
84
|
+
withCarinBBProfile: true,
|
|
99
85
|
};
|
package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.stories.js
CHANGED
|
@@ -2,8 +2,6 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import ExplanationOfBenefitGraph from './ExplanationOfBenefitGraph';
|
|
4
4
|
|
|
5
|
-
export default { title: 'ExplanationOfBenefitGraph' };
|
|
6
|
-
|
|
7
5
|
const CHART_DATA = [
|
|
8
6
|
{
|
|
9
7
|
id: 'a',
|
|
@@ -31,48 +29,86 @@ const CHART_DATA = [
|
|
|
31
29
|
},
|
|
32
30
|
];
|
|
33
31
|
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
export default {
|
|
33
|
+
title: 'ExplanationOfBenefit/ExplanationOfBenefitGraph',
|
|
34
|
+
component: ExplanationOfBenefitGraph,
|
|
35
|
+
argTypes: {
|
|
36
|
+
data: {
|
|
37
|
+
table: {
|
|
38
|
+
disable: true,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
margin: {
|
|
42
|
+
table: {
|
|
43
|
+
disable: true,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
totalLabel: {
|
|
47
|
+
table: {
|
|
48
|
+
disable: true,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
height: {
|
|
52
|
+
table: {
|
|
53
|
+
disable: true,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
enableLinkLabels: {
|
|
57
|
+
table: {
|
|
58
|
+
disable: true,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
enableValueLabels: {
|
|
62
|
+
table: {
|
|
63
|
+
disable: true,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
pieChartProperties: {
|
|
67
|
+
table: {
|
|
68
|
+
disable: true,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const Template = args => <ExplanationOfBenefitGraph {...args} />;
|
|
75
|
+
|
|
76
|
+
export const DefaultExplanationOfBenefitGraph = Template.bind({});
|
|
77
|
+
DefaultExplanationOfBenefitGraph.args = {
|
|
78
|
+
data: CHART_DATA,
|
|
79
|
+
margin: { top: 10, bottom: 10 },
|
|
41
80
|
};
|
|
42
81
|
|
|
43
|
-
export const ExplanationOfBenefitGraphWithCustomCenteredMetric = (
|
|
44
|
-
|
|
82
|
+
export const ExplanationOfBenefitGraphWithCustomCenteredMetric = Template.bind(
|
|
83
|
+
{},
|
|
84
|
+
);
|
|
85
|
+
ExplanationOfBenefitGraphWithCustomCenteredMetric.args = {
|
|
86
|
+
data: CHART_DATA,
|
|
87
|
+
totalLabel: 'Custom',
|
|
45
88
|
};
|
|
46
89
|
|
|
47
|
-
export const ExplanationOfBenefitGraphWithHeightAndMargin = ()
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
height={250}
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
90
|
+
export const ExplanationOfBenefitGraphWithHeightAndMargin = Template.bind({});
|
|
91
|
+
ExplanationOfBenefitGraphWithHeightAndMargin.args = {
|
|
92
|
+
data: CHART_DATA,
|
|
93
|
+
margin: { top: 40, bottom: 40 },
|
|
94
|
+
height: 250,
|
|
55
95
|
};
|
|
56
96
|
|
|
57
|
-
export const ExplanationOfBenefitGraphWithLabels = ()
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
enableValueLabels
|
|
64
|
-
/>
|
|
65
|
-
);
|
|
97
|
+
export const ExplanationOfBenefitGraphWithLabels = Template.bind({});
|
|
98
|
+
ExplanationOfBenefitGraphWithLabels.args = {
|
|
99
|
+
data: CHART_DATA,
|
|
100
|
+
margin: { top: 20, bottom: 20 },
|
|
101
|
+
enableLinkLabels: true,
|
|
102
|
+
enableValueLabels: true,
|
|
66
103
|
};
|
|
67
104
|
|
|
68
|
-
export const ExplanationOfBenefitGraphWithPieChartProperties = (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
);
|
|
105
|
+
export const ExplanationOfBenefitGraphWithPieChartProperties = Template.bind(
|
|
106
|
+
{},
|
|
107
|
+
);
|
|
108
|
+
ExplanationOfBenefitGraphWithPieChartProperties.args = {
|
|
109
|
+
data: CHART_DATA,
|
|
110
|
+
margin: { top: 20, bottom: 20 },
|
|
111
|
+
enableLinkLabels: true,
|
|
112
|
+
enableValueLabels: true,
|
|
113
|
+
pieChartProperties: { startAngle: 90, cornerRadius: 15, borderWidth: 4 },
|
|
78
114
|
};
|
|
@@ -75,6 +75,7 @@ const FamilyMemberHistory = ({
|
|
|
75
75
|
fhirVersion,
|
|
76
76
|
fhirIcons,
|
|
77
77
|
onClick,
|
|
78
|
+
rawOnClick,
|
|
78
79
|
}) => {
|
|
79
80
|
let fhirResourceData = {};
|
|
80
81
|
try {
|
|
@@ -140,6 +141,7 @@ const FamilyMemberHistory = ({
|
|
|
140
141
|
}
|
|
141
142
|
bodyContent={<Body tableData={tableData} />}
|
|
142
143
|
onClick={onClick}
|
|
144
|
+
rawOnClick={rawOnClick}
|
|
143
145
|
/>
|
|
144
146
|
</Root>
|
|
145
147
|
);
|