fhir-react 0.3.9 → 0.3.12
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 +17 -1
- package/build/index.js +9 -9
- package/package.json +5 -4
- package/src/components/containers/Accordion/Accordion.js +8 -4
- package/src/components/containers/Accordion/Accordion.stories.js +74 -58
- package/src/components/containers/ResourceContainer/ResourceContainer.stories.js +43 -41
- package/src/components/defaultArgTypes.js +12 -0
- package/src/components/resources/AdverseEvent/AdverseEvent.js +2 -0
- package/src/components/resources/AdverseEvent/AdverseEvent.stories.js +17 -19
- package/src/components/resources/AllergyIntolerance/AllergyIntolerance.js +4 -0
- package/src/components/resources/AllergyIntolerance/AllergyIntolerance.stories.js +46 -70
- package/src/components/resources/Appointment/Appointment.js +2 -0
- 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 +3 -0
- package/src/components/resources/CarePlan/CarePlan.stories.js +44 -54
- package/src/components/resources/CareTeam/CareTeam.js +2 -0
- package/src/components/resources/CareTeam/CareTeam.stories.js +22 -28
- package/src/components/resources/Claim/Claim.js +3 -0
- package/src/components/resources/Claim/Claim.stories.js +37 -50
- package/src/components/resources/ClaimResponse/ClaimResponse.js +2 -0
- package/src/components/resources/ClaimResponse/ClaimResponse.stories.js +42 -52
- package/src/components/resources/Condition/Condition.js +2 -0
- package/src/components/resources/Condition/Condition.stories.js +47 -62
- package/src/components/resources/Coverage/Coverage.js +3 -0
- package/src/components/resources/Coverage/Coverage.stories.js +38 -50
- package/src/components/resources/Device/Device.js +3 -0
- 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 +2 -0
- package/src/components/resources/Encounter/Encounter.stories.js +43 -59
- package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.js +18 -3
- 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 +8 -1
- package/src/components/resources/Generic/Generic.stories.js +21 -12
- package/src/components/resources/Goal/Goal.js +2 -0
- package/src/components/resources/Goal/Goal.stories.js +35 -49
- package/src/components/resources/Immunization/Immunization.js +2 -0
- 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 +8 -1
- package/src/components/resources/Location/Location.stories.js +23 -18
- package/src/components/resources/Medication/Medication.js +2 -0
- package/src/components/resources/Medication/Medication.stories.js +42 -64
- package/src/components/resources/MedicationAdministration/MedicationAdministration.js +4 -2
- 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 +8 -1
- package/src/components/resources/MedicationOrder/MedicationOrder.stories.js +11 -4
- package/src/components/resources/MedicationRequest/MedicationRequest.js +2 -0
- 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 +8 -1
- package/src/components/resources/Observation/Observation.stories.js +39 -33
- package/src/components/resources/Organization/Organization.js +2 -0
- 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 +4 -0
- 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 +8 -1
- package/src/components/resources/Procedure/Procedure.stories.js +33 -25
- package/src/components/resources/Questionnaire/Questionnaire.js +2 -0
- 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 +2 -0
- package/src/components/resources/ReferralRequest/ReferralRequest.stories.js +20 -20
- package/src/components/resources/RelatedPerson/RelatedPerson.js +2 -0
- package/src/components/resources/RelatedPerson/RelatedPerson.stories.js +26 -30
- package/src/components/resources/ResearchStudy/ResearchStudy.js +2 -0
- package/src/components/resources/ResearchStudy/ResearchStudy.stories.js +17 -15
- package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +40 -27
- package/src/components/supportedFhirResourceList.js +2 -0
- package/.storybook/addons.js +0 -1
- package/.storybook/config.js +0 -26
- package/.storybook/presets.js +0 -1
|
@@ -76,6 +76,7 @@ const FamilyMemberHistory = ({
|
|
|
76
76
|
fhirIcons,
|
|
77
77
|
onClick,
|
|
78
78
|
rawOnClick,
|
|
79
|
+
customId,
|
|
79
80
|
}) => {
|
|
80
81
|
let fhirResourceData = {};
|
|
81
82
|
try {
|
|
@@ -142,6 +143,7 @@ const FamilyMemberHistory = ({
|
|
|
142
143
|
bodyContent={<Body tableData={tableData} />}
|
|
143
144
|
onClick={onClick}
|
|
144
145
|
rawOnClick={rawOnClick}
|
|
146
|
+
customId={customId}
|
|
145
147
|
/>
|
|
146
148
|
</Root>
|
|
147
149
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import FamilyMemberHistory from './FamilyMemberHistory';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -12,38 +12,32 @@ import fhirIcons from '../../../fixtures/example-icons';
|
|
|
12
12
|
import FamilyMemberHistoryIcon from '../../../assets/containers/FamilyMemberHistory/family-member-history.svg';
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
|
-
title: 'FamilyMemberHistory',
|
|
15
|
+
title: 'Coverage/FamilyMemberHistory',
|
|
16
|
+
component: FamilyMemberHistory,
|
|
17
|
+
argTypes: {
|
|
18
|
+
...defaultArgTypes,
|
|
19
|
+
},
|
|
16
20
|
};
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
22
|
+
const Template = args => <FamilyMemberHistory {...args} />;
|
|
23
|
+
|
|
24
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
25
|
+
DefaultVisualizationDSTU2.args = {
|
|
26
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
27
|
+
fhirResource: example1DSTU2,
|
|
28
|
+
fhirIcons: require('../../../assets/containers/FamilyMemberHistory/family-member-history.svg'),
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
export const Example1OfSTU3 = ()
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fhirResource={fhirResource}
|
|
35
|
-
fhirIcons={FamilyMemberHistoryIcon}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
31
|
+
export const Example1OfSTU3 = Template.bind({});
|
|
32
|
+
Example1OfSTU3.args = {
|
|
33
|
+
fhirVersion: fhirVersions.STU3,
|
|
34
|
+
fhirResource: example1STU3,
|
|
35
|
+
fhirIcons: FamilyMemberHistoryIcon,
|
|
38
36
|
};
|
|
39
37
|
|
|
40
|
-
export const Example2OfSTU3 = ()
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
fhirResource={fhirResource}
|
|
46
|
-
fhirIcons={fhirIcons}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
38
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
39
|
+
Example2OfSTU3.args = {
|
|
40
|
+
fhirVersion: fhirVersions.STU3,
|
|
41
|
+
fhirResource: example2STU3,
|
|
42
|
+
fhirIcons: fhirIcons,
|
|
49
43
|
};
|
|
@@ -4,7 +4,13 @@ import _get from 'lodash/get';
|
|
|
4
4
|
import { Root, Header } from '../../ui';
|
|
5
5
|
import Accordion from '../../containers/Accordion';
|
|
6
6
|
|
|
7
|
-
const Generic = ({
|
|
7
|
+
const Generic = ({
|
|
8
|
+
fhirResource,
|
|
9
|
+
fhirIcons,
|
|
10
|
+
onClick,
|
|
11
|
+
rawOnClick,
|
|
12
|
+
customId,
|
|
13
|
+
}) => {
|
|
8
14
|
const title = fhirResource
|
|
9
15
|
? `${fhirResource.resourceType}/${fhirResource.id}`
|
|
10
16
|
: `Unknown Resource`;
|
|
@@ -31,6 +37,7 @@ const Generic = ({ fhirResource, fhirIcons, onClick, rawOnClick }) => {
|
|
|
31
37
|
}
|
|
32
38
|
onClick={onClick}
|
|
33
39
|
rawOnClick={rawOnClick}
|
|
40
|
+
customId={customId}
|
|
34
41
|
/>
|
|
35
42
|
</Root>
|
|
36
43
|
);
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Generic from './Generic';
|
|
5
5
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
6
6
|
|
|
7
|
-
export default {
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Generic',
|
|
9
|
+
component: Generic,
|
|
10
|
+
argTypes: {
|
|
11
|
+
...defaultArgTypes,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Template = args => <Generic {...args} />;
|
|
8
16
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const exampleResource = {
|
|
18
|
+
resourceType: 'UnknownResource',
|
|
19
|
+
id: '12345',
|
|
20
|
+
code: {
|
|
21
|
+
text: 'Resource code text',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export const DefaultVisualization = Template.bind({});
|
|
25
|
+
DefaultVisualization.args = {
|
|
26
|
+
fhirResource: exampleResource,
|
|
27
|
+
fhirIcons: fhirIcons,
|
|
19
28
|
};
|
|
@@ -105,6 +105,7 @@ const Goal = ({
|
|
|
105
105
|
fhirIcons,
|
|
106
106
|
onClick,
|
|
107
107
|
rawOnClick,
|
|
108
|
+
customId,
|
|
108
109
|
}) => {
|
|
109
110
|
let fhirResourceData = {};
|
|
110
111
|
try {
|
|
@@ -235,6 +236,7 @@ const Goal = ({
|
|
|
235
236
|
bodyContent={<Body tableData={tableData} />}
|
|
236
237
|
onClick={onClick}
|
|
237
238
|
rawOnClick={rawOnClick}
|
|
239
|
+
customId={customId}
|
|
238
240
|
/>
|
|
239
241
|
</Root>
|
|
240
242
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Goal from './Goal';
|
|
5
5
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
@@ -13,64 +13,50 @@ import GoalIcon from '../../../assets/containers/Goal/goal.svg';
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
title: 'Goal',
|
|
16
|
+
component: Goal,
|
|
17
|
+
argTypes: {
|
|
18
|
+
...defaultArgTypes,
|
|
19
|
+
},
|
|
16
20
|
};
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
22
|
+
const Template = args => <Goal {...args} />;
|
|
23
|
+
|
|
24
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
25
|
+
DefaultVisualizationDSTU2.args = {
|
|
26
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
27
|
+
fhirResource: dstu2Example1,
|
|
28
|
+
fhirIcons: require('../../../assets/containers/Goal/goal.svg'),
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
export const Example2OfDSTU2 = ()
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fhirResource={fhirResource}
|
|
35
|
-
fhirIcons={GoalIcon}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
31
|
+
export const Example2OfDSTU2 = Template.bind({});
|
|
32
|
+
Example2OfDSTU2.args = {
|
|
33
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
34
|
+
fhirResource: dstu2Example2,
|
|
35
|
+
fhirIcons: GoalIcon,
|
|
38
36
|
};
|
|
39
37
|
|
|
40
|
-
export const ExampleOfSTU3 = ()
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
fhirResource={fhirResource}
|
|
46
|
-
fhirIcons={fhirIcons}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
38
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
39
|
+
ExampleOfSTU3.args = {
|
|
40
|
+
fhirVersion: fhirVersions.STU3,
|
|
41
|
+
fhirResource: stu3Example1,
|
|
42
|
+
fhirIcons: fhirIcons,
|
|
49
43
|
};
|
|
50
44
|
|
|
51
|
-
export const Example1OfR4 = ()
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
fhirResource={fhirResource}
|
|
57
|
-
fhirIcons={false}
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
45
|
+
export const Example1OfR4 = Template.bind({});
|
|
46
|
+
Example1OfR4.args = {
|
|
47
|
+
fhirVersion: fhirVersions.R4,
|
|
48
|
+
fhirResource: r4Example1,
|
|
49
|
+
fhirIcons: false,
|
|
60
50
|
};
|
|
61
51
|
|
|
62
|
-
export const Example2OfR4 = ()
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
fhirResource={fhirResource}
|
|
68
|
-
fhirIcons={'random text'}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
52
|
+
export const Example2OfR4 = Template.bind({});
|
|
53
|
+
Example2OfR4.args = {
|
|
54
|
+
fhirVersion: fhirVersions.R4,
|
|
55
|
+
fhirResource: r4Example2,
|
|
56
|
+
fhirIcons: 'random text',
|
|
71
57
|
};
|
|
72
58
|
|
|
73
|
-
export const ExampleWithoutFhirVersionProperty = ()
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
export const ExampleWithoutFhirVersionProperty = Template.bind({});
|
|
60
|
+
ExampleWithoutFhirVersionProperty.args = {
|
|
61
|
+
fhirResource: stu3Example1,
|
|
76
62
|
};
|
|
@@ -109,6 +109,7 @@ const Immunization = ({
|
|
|
109
109
|
fhirIcons,
|
|
110
110
|
onClick,
|
|
111
111
|
rawOnClick,
|
|
112
|
+
customId,
|
|
112
113
|
}) => {
|
|
113
114
|
const {
|
|
114
115
|
title,
|
|
@@ -248,6 +249,7 @@ const Immunization = ({
|
|
|
248
249
|
bodyContent={<Body tableData={tableData} />}
|
|
249
250
|
onClick={onClick}
|
|
250
251
|
rawOnClick={rawOnClick}
|
|
252
|
+
customId={customId}
|
|
251
253
|
/>
|
|
252
254
|
</Root>
|
|
253
255
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Immunization from './Immunization';
|
|
5
5
|
|
|
@@ -15,64 +15,51 @@ import ImmunizationIcon from '../../../assets/containers/Immunization/immunizati
|
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
17
|
title: 'Immunization',
|
|
18
|
+
component: Immunization,
|
|
19
|
+
argTypes: {
|
|
20
|
+
...defaultArgTypes,
|
|
21
|
+
},
|
|
18
22
|
};
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
24
|
+
const Template = args => <Immunization {...args} />;
|
|
25
|
+
|
|
26
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
27
|
+
DefaultVisualizationDSTU2.args = {
|
|
28
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
29
|
+
fhirResource: example1,
|
|
30
|
+
fhirIcons: require('../../../assets/containers/Immunization/immunization.svg'),
|
|
29
31
|
};
|
|
30
32
|
|
|
31
|
-
export const Example2OfDSTU2 = ()
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
37
|
-
fhirIcons={ImmunizationIcon}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
33
|
+
export const Example2OfDSTU2 = Template.bind({});
|
|
34
|
+
Example2OfDSTU2.args = {
|
|
35
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
36
|
+
fhirResource: example2,
|
|
37
|
+
fhirIcons: ImmunizationIcon,
|
|
40
38
|
};
|
|
41
39
|
|
|
42
|
-
export const ExampleSTU3 = ()
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
fhirVersion={fhirVersions.STU3}
|
|
48
|
-
fhirIcons={fhirIcons}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
40
|
+
export const ExampleSTU3 = Template.bind({});
|
|
41
|
+
ExampleSTU3.args = {
|
|
42
|
+
fhirVersion: fhirVersions.STU3,
|
|
43
|
+
fhirResource: stu3Example,
|
|
44
|
+
fhirIcons: fhirIcons,
|
|
51
45
|
};
|
|
52
46
|
|
|
53
|
-
export const Example1R4 = ()
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
fhirVersion={fhirVersions.R4}
|
|
59
|
-
fhirIcons={false}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
47
|
+
export const Example1R4 = Template.bind({});
|
|
48
|
+
Example1R4.args = {
|
|
49
|
+
fhirVersion: fhirVersions.R4,
|
|
50
|
+
fhirResource: r4Example1,
|
|
51
|
+
fhirIcons: false,
|
|
62
52
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
fhirIcons={'random text'}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
53
|
+
|
|
54
|
+
export const Example2R4 = Template.bind({});
|
|
55
|
+
Example2R4.args = {
|
|
56
|
+
fhirVersion: fhirVersions.R4,
|
|
57
|
+
fhirResource: r4Example2,
|
|
58
|
+
fhirIcons: 'random text',
|
|
72
59
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
|
|
61
|
+
export const Example3R4 = Template.bind({});
|
|
62
|
+
Example3R4.args = {
|
|
63
|
+
fhirVersion: fhirVersions.R4,
|
|
64
|
+
fhirResource: r4Example3,
|
|
78
65
|
};
|
|
@@ -132,6 +132,7 @@ const List = ({
|
|
|
132
132
|
fhirIcons,
|
|
133
133
|
onClick,
|
|
134
134
|
rawOnClick,
|
|
135
|
+
customId,
|
|
135
136
|
}) => {
|
|
136
137
|
let fhirResourceData = {};
|
|
137
138
|
try {
|
|
@@ -293,6 +294,7 @@ const List = ({
|
|
|
293
294
|
}
|
|
294
295
|
onClick={onClick}
|
|
295
296
|
rawOnClick={rawOnClick}
|
|
297
|
+
customId={customId}
|
|
296
298
|
/>
|
|
297
299
|
</Root>
|
|
298
300
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import List from './List';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -19,90 +19,86 @@ import ListIcon from '../../../assets/containers/List/list.svg';
|
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
21
|
title: 'List',
|
|
22
|
+
component: List,
|
|
23
|
+
argTypes: {
|
|
24
|
+
...defaultArgTypes,
|
|
25
|
+
withDaVinciPDex: {
|
|
26
|
+
table: {
|
|
27
|
+
disable: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
22
31
|
};
|
|
23
32
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
33
|
+
const Template = args => <List {...args} />;
|
|
34
|
+
|
|
35
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
36
|
+
DefaultVisualizationDSTU2.args = {
|
|
37
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
38
|
+
fhirResource: example1Dstu2,
|
|
39
|
+
fhirIcons: require('../../../assets/containers/List/list.svg'),
|
|
33
40
|
};
|
|
34
41
|
|
|
35
|
-
export const Example2DSTU2 = ()
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
fhirResource={fhirResource}
|
|
41
|
-
fhirIcons={ListIcon}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
42
|
+
export const Example2DSTU2 = Template.bind({});
|
|
43
|
+
Example2DSTU2.args = {
|
|
44
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
45
|
+
fhirResource: example2Dstu2,
|
|
46
|
+
fhirIcons: ListIcon,
|
|
44
47
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
fhirIcons={fhirIcons}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
48
|
+
|
|
49
|
+
export const Example3DSTU2 = Template.bind({});
|
|
50
|
+
Example3DSTU2.args = {
|
|
51
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
52
|
+
fhirResource: example3Dstu2,
|
|
53
|
+
fhirIcons: fhirIcons,
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
export const DefaultVisualizationSTU3 = ()
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fhirResource={fhirResource}
|
|
62
|
-
fhirIcons={false}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
56
|
+
export const DefaultVisualizationSTU3 = Template.bind({});
|
|
57
|
+
DefaultVisualizationSTU3.args = {
|
|
58
|
+
fhirVersion: fhirVersions.STU3,
|
|
59
|
+
fhirResource: example1Stu3,
|
|
60
|
+
fhirIcons: false,
|
|
65
61
|
};
|
|
66
62
|
|
|
67
|
-
export const Example2STU3 = ()
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
fhirResource={fhirResource}
|
|
73
|
-
fhirIcons={'random text'}
|
|
74
|
-
/>
|
|
75
|
-
);
|
|
63
|
+
export const Example2STU3 = Template.bind({});
|
|
64
|
+
Example2STU3.args = {
|
|
65
|
+
fhirVersion: fhirVersions.STU3,
|
|
66
|
+
fhirResource: example2Stu3,
|
|
67
|
+
fhirIcons: 'random text',
|
|
76
68
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
69
|
+
|
|
70
|
+
export const Example3STU3 = Template.bind({});
|
|
71
|
+
Example3STU3.args = {
|
|
72
|
+
fhirVersion: fhirVersions.STU3,
|
|
73
|
+
fhirResource: example3Stu3,
|
|
80
74
|
};
|
|
81
75
|
|
|
82
|
-
export const DefaultVisualizationR4 = ()
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
export const DefaultVisualizationR4 = Template.bind({});
|
|
77
|
+
DefaultVisualizationR4.args = {
|
|
78
|
+
fhirVersion: fhirVersions.R4,
|
|
79
|
+
fhirResource: example1R4,
|
|
85
80
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
|
|
82
|
+
export const ExampleR4WithoutDaVinciPDex = Template.bind({});
|
|
83
|
+
ExampleR4WithoutDaVinciPDex.args = {
|
|
84
|
+
fhirVersion: fhirVersions.R4,
|
|
85
|
+
fhirResource: example2R4,
|
|
89
86
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
withDaVinciPDex
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
87
|
+
|
|
88
|
+
export const ExampleR4WithDaVinciPDex = Template.bind({});
|
|
89
|
+
ExampleR4WithDaVinciPDex.args = {
|
|
90
|
+
fhirVersion: fhirVersions.R4,
|
|
91
|
+
fhirResource: example2R4,
|
|
92
|
+
withDaVinciPDex: true,
|
|
99
93
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
|
|
95
|
+
export const Example2R4 = Template.bind({});
|
|
96
|
+
Example2R4.args = {
|
|
97
|
+
fhirVersion: fhirVersions.R4,
|
|
98
|
+
fhirResource: example3R4,
|
|
103
99
|
};
|
|
104
100
|
|
|
105
|
-
export const ExampleWithoutFHIRVersionProperty = ()
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
export const ExampleWithoutFHIRVersionProperty = Template.bind({});
|
|
102
|
+
ExampleWithoutFHIRVersionProperty.args = {
|
|
103
|
+
fhirResource: example3R4,
|
|
108
104
|
};
|
|
@@ -9,7 +9,13 @@ import CodeableConcept from '../../datatypes/CodeableConcept';
|
|
|
9
9
|
import Reference from '../../datatypes/Reference';
|
|
10
10
|
import Accordion from '../../containers/Accordion';
|
|
11
11
|
|
|
12
|
-
const Location = ({
|
|
12
|
+
const Location = ({
|
|
13
|
+
fhirResource,
|
|
14
|
+
fhirIcons,
|
|
15
|
+
onClick,
|
|
16
|
+
rawOnClick,
|
|
17
|
+
customId,
|
|
18
|
+
}) => {
|
|
13
19
|
const name = _get(fhirResource, 'name');
|
|
14
20
|
const status = _get(fhirResource, 'status');
|
|
15
21
|
const description = _get(fhirResource, 'description');
|
|
@@ -83,6 +89,7 @@ const Location = ({ fhirResource, fhirIcons, onClick, rawOnClick }) => {
|
|
|
83
89
|
bodyContent={<Body tableData={tableData} />}
|
|
84
90
|
onClick={onClick}
|
|
85
91
|
rawOnClick={rawOnClick}
|
|
92
|
+
customId={customId}
|
|
86
93
|
/>
|
|
87
94
|
</Root>
|
|
88
95
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Location from './Location';
|
|
5
5
|
|
|
@@ -12,29 +12,34 @@ import LocationIcon from '../../../assets/containers/Location/location.svg';
|
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
title: 'Location',
|
|
15
|
+
component: Location,
|
|
16
|
+
argTypes: {
|
|
17
|
+
...defaultArgTypes,
|
|
18
|
+
},
|
|
15
19
|
};
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
21
|
+
const Template = args => <Location {...args} />;
|
|
22
|
+
|
|
23
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
24
|
+
DefaultVisualizationDSTU2.args = {
|
|
25
|
+
fhirResource: dstu2Example1,
|
|
26
|
+
fhirIcons: require('../../../assets/containers/Location/location.svg'),
|
|
25
27
|
};
|
|
26
28
|
|
|
27
|
-
export const ExampleOfSTU3 = ()
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
30
|
+
ExampleOfSTU3.args = {
|
|
31
|
+
fhirResource: stu3Example1,
|
|
32
|
+
fhirIcons: LocationIcon,
|
|
30
33
|
};
|
|
31
34
|
|
|
32
|
-
export const Example1OfR4 = ()
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
export const Example1OfR4 = Template.bind({});
|
|
36
|
+
Example1OfR4.args = {
|
|
37
|
+
fhirResource: r4Example1,
|
|
38
|
+
fhirIcons: fhirIcons,
|
|
35
39
|
};
|
|
36
40
|
|
|
37
|
-
export const Example2OfR4 = ()
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
export const Example2OfR4 = Template.bind({});
|
|
42
|
+
Example2OfR4.args = {
|
|
43
|
+
fhirResource: r4Example2,
|
|
44
|
+
fhirIcons: false,
|
|
40
45
|
};
|