fhir-react 0.3.9 → 0.3.10
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 +7 -0
- package/README.md +1 -1
- package/package.json +5 -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.stories.js +17 -19
- package/src/components/resources/AllergyIntolerance/AllergyIntolerance.stories.js +46 -70
- package/src/components/resources/Appointment/Appointment.stories.js +51 -62
- 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.stories.js +44 -54
- package/src/components/resources/CareTeam/CareTeam.stories.js +22 -28
- package/src/components/resources/Claim/Claim.stories.js +36 -49
- package/src/components/resources/ClaimResponse/ClaimResponse.stories.js +42 -52
- package/src/components/resources/Condition/Condition.stories.js +47 -62
- package/src/components/resources/Coverage/Coverage.stories.js +38 -50
- package/src/components/resources/Device/Device.stories.js +40 -52
- package/src/components/resources/DiagnosticReport/DiagnosticReport.stories.js +38 -50
- package/src/components/resources/DocumentReference/DocumentReference.stories.js +25 -29
- package/src/components/resources/Encounter/Encounter.stories.js +43 -59
- 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.stories.js +22 -28
- package/src/components/resources/Generic/Generic.stories.js +21 -12
- package/src/components/resources/Goal/Goal.stories.js +35 -49
- package/src/components/resources/Immunization/Immunization.stories.js +38 -51
- package/src/components/resources/List/List.stories.js +66 -70
- package/src/components/resources/Location/Location.stories.js +23 -18
- package/src/components/resources/Medication/Medication.stories.js +42 -64
- package/src/components/resources/MedicationAdministration/MedicationAdministration.stories.js +32 -46
- package/src/components/resources/MedicationDispense/MedicationDispense.stories.js +39 -57
- package/src/components/resources/MedicationKnowledge/MedicationKnowledge.stories.js +49 -58
- package/src/components/resources/MedicationOrder/MedicationOrder.stories.js +11 -4
- package/src/components/resources/MedicationRequest/MedicationRequest.stories.js +27 -30
- package/src/components/resources/MedicationStatement/MedicationStatement.stories.js +32 -46
- package/src/components/resources/Observation/Observation.stories.js +39 -33
- package/src/components/resources/Organization/Organization.stories.js +40 -52
- package/src/components/resources/Patient/Patient.stories.js +36 -28
- package/src/components/resources/Practitioner/Practitioner.stories.js +39 -52
- package/src/components/resources/PractitionerRole/PractitionerRole.stories.js +43 -63
- package/src/components/resources/Procedure/Procedure.stories.js +33 -25
- package/src/components/resources/Questionnaire/Questionnaire.stories.js +47 -62
- package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.stories.js +43 -63
- package/src/components/resources/ReferralRequest/ReferralRequest.stories.js +20 -20
- package/src/components/resources/RelatedPerson/RelatedPerson.stories.js +26 -30
- package/src/components/resources/ResearchStudy/ResearchStudy.stories.js +17 -15
- package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +40 -27
- package/.storybook/addons.js +0 -1
- package/.storybook/config.js +0 -26
- package/.storybook/presets.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import MedicationKnowledge from './MedicationKnowledge';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -13,72 +13,63 @@ import MedicationKnowledgeIcon from '../../../assets/containers/MedicationKnowle
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
title: 'MedicationKnowledge',
|
|
16
|
+
component: MedicationKnowledge,
|
|
17
|
+
argTypes: {
|
|
18
|
+
...defaultArgTypes,
|
|
19
|
+
withDaVinciPDex: {
|
|
20
|
+
table: {
|
|
21
|
+
disable: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
16
25
|
};
|
|
17
26
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
+
const Template = args => <MedicationKnowledge {...args} />;
|
|
28
|
+
|
|
29
|
+
export const DefaultVisualizationR4 = Template.bind({});
|
|
30
|
+
DefaultVisualizationR4.args = {
|
|
31
|
+
fhirVersion: fhirVersions.R4,
|
|
32
|
+
fhirResource: example1R4,
|
|
33
|
+
fhirIcons: require('../../../assets/containers/MedicationKnowledge/medication-knowledge.svg'),
|
|
27
34
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fhirIcons={MedicationKnowledgeIcon}
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
35
|
+
|
|
36
|
+
export const ExampleR4WithoutDaVinciPDex = Template.bind({});
|
|
37
|
+
ExampleR4WithoutDaVinciPDex.args = {
|
|
38
|
+
fhirVersion: fhirVersions.R4,
|
|
39
|
+
fhirResource: example2R4,
|
|
40
|
+
fhirIcons: MedicationKnowledgeIcon,
|
|
37
41
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
fhirIcons={fhirIcons}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
42
|
+
|
|
43
|
+
export const ExampleR4WithDaVinciPDex = Template.bind({});
|
|
44
|
+
ExampleR4WithDaVinciPDex.args = {
|
|
45
|
+
fhirVersion: fhirVersions.R4,
|
|
46
|
+
fhirResource: example2R4,
|
|
47
|
+
fhirIcons: fhirIcons,
|
|
48
|
+
withDaVinciPDex: true,
|
|
48
49
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/>
|
|
56
|
-
);
|
|
50
|
+
|
|
51
|
+
export const Example2R4 = Template.bind({});
|
|
52
|
+
Example2R4.args = {
|
|
53
|
+
fhirVersion: fhirVersions.R4,
|
|
54
|
+
fhirResource: example3R4,
|
|
55
|
+
fhirIcons: false,
|
|
57
56
|
};
|
|
58
57
|
|
|
59
|
-
export const Example3R4WithDaVinciPDex = ()
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
withDaVinciPDex
|
|
66
|
-
fhirIcons={false}
|
|
67
|
-
/>
|
|
68
|
-
);
|
|
58
|
+
export const Example3R4WithDaVinciPDex = Template.bind({});
|
|
59
|
+
Example3R4WithDaVinciPDex.args = {
|
|
60
|
+
fhirVersion: fhirVersions.R4,
|
|
61
|
+
fhirResource: example4R4,
|
|
62
|
+
fhirIcons: 'random text',
|
|
63
|
+
withDaVinciPDex: true,
|
|
69
64
|
};
|
|
70
65
|
|
|
71
|
-
export const ExampleWithoutFHIRVersionProperty = ()
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
export const ExampleWithoutFHIRVersionProperty = Template.bind({});
|
|
67
|
+
ExampleWithoutFHIRVersionProperty.args = {
|
|
68
|
+
fhirResource: example3R4,
|
|
74
69
|
};
|
|
75
70
|
|
|
76
|
-
export const ExampleWithUnsupportedFHIRVersionProperty = ()
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
81
|
-
fhirResource={fhirResource}
|
|
82
|
-
/>
|
|
83
|
-
);
|
|
71
|
+
export const ExampleWithUnsupportedFHIRVersionProperty = Template.bind({});
|
|
72
|
+
ExampleWithUnsupportedFHIRVersionProperty.args = {
|
|
73
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
74
|
+
fhirResource: example4R4,
|
|
84
75
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import MedicationOrder from './MedicationOrder';
|
|
5
5
|
|
|
@@ -7,9 +7,16 @@ import dstu2Example from '../../../fixtures/dstu2/resources/medicationOrder/exam
|
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
title: 'MedicationOrder',
|
|
10
|
+
component: MedicationOrder,
|
|
11
|
+
argTypes: {
|
|
12
|
+
...defaultArgTypes,
|
|
13
|
+
},
|
|
10
14
|
};
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
const Template = args => <MedicationOrder {...args} />;
|
|
17
|
+
|
|
18
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
19
|
+
DefaultVisualizationDSTU2.args = {
|
|
20
|
+
fhirResource: dstu2Example,
|
|
21
|
+
fhirIcons: require('../../../assets/containers/MedicationOrder/medication-order.svg'),
|
|
15
22
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import MedicationRequest from './MedicationRequest';
|
|
5
5
|
|
|
@@ -13,43 +13,40 @@ import MedicationRequestIcon from '../../../assets/containers/MedicationRequest/
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
title: 'MedicationRequest',
|
|
16
|
+
component: MedicationRequest,
|
|
17
|
+
argTypes: {
|
|
18
|
+
...defaultArgTypes,
|
|
19
|
+
},
|
|
16
20
|
};
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
22
|
+
const Template = args => <MedicationRequest {...args} />;
|
|
23
|
+
|
|
24
|
+
export const DefaultVisualizationSTU3 = Template.bind({});
|
|
25
|
+
DefaultVisualizationSTU3.args = {
|
|
26
|
+
fhirResource: stu3Example1,
|
|
27
|
+
fhirIcons: require('../../../assets/containers/MedicationRequest/medication-request.svg'),
|
|
26
28
|
};
|
|
27
29
|
|
|
28
|
-
export const Example2OfSTU3 = ()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fhirResource={fhirResource}
|
|
33
|
-
fhirIcons={MedicationRequestIcon}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
30
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
31
|
+
Example2OfSTU3.args = {
|
|
32
|
+
fhirResource: stu3Example2,
|
|
33
|
+
fhirIcons: MedicationRequestIcon,
|
|
36
34
|
};
|
|
37
35
|
|
|
38
|
-
export const Example1OfR4 = ()
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
);
|
|
36
|
+
export const Example1OfR4 = Template.bind({});
|
|
37
|
+
Example1OfR4.args = {
|
|
38
|
+
fhirResource: R4Example1,
|
|
39
|
+
fhirIcons: fhirIcons,
|
|
43
40
|
};
|
|
44
41
|
|
|
45
|
-
export const Example2OfR4 = ()
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
export const Example2OfR4 = Template.bind({});
|
|
43
|
+
Example2OfR4.args = {
|
|
44
|
+
fhirResource: R4Example2,
|
|
45
|
+
fhirIcons: false,
|
|
48
46
|
};
|
|
49
47
|
|
|
50
|
-
export const Example3OfR4 = ()
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
);
|
|
48
|
+
export const Example3OfR4 = Template.bind({});
|
|
49
|
+
Example3OfR4.args = {
|
|
50
|
+
fhirResource: R4Example3,
|
|
51
|
+
fhirIcons: 'random text',
|
|
55
52
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import MedicationStatement from './MedicationStatement';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -14,59 +14,45 @@ import MedicationStatementIcon from '../../../assets/containers/MedicationStatem
|
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
title: 'MedicationStatement',
|
|
17
|
+
component: MedicationStatement,
|
|
18
|
+
argTypes: {
|
|
19
|
+
...defaultArgTypes,
|
|
20
|
+
},
|
|
17
21
|
};
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
23
|
+
const Template = args => <MedicationStatement {...args} />;
|
|
24
|
+
|
|
25
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
26
|
+
DefaultVisualizationDSTU2.args = {
|
|
27
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
28
|
+
fhirResource: dstu2Example1,
|
|
29
|
+
fhirIcons: require('../../../assets/containers/MedicationStatement/medication-statement.svg'),
|
|
28
30
|
};
|
|
29
31
|
|
|
30
|
-
export const ExampleOfSTU3 = ()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
fhirResource={fhirResource}
|
|
36
|
-
fhirIcons={MedicationStatementIcon}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
32
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
33
|
+
ExampleOfSTU3.args = {
|
|
34
|
+
fhirVersion: fhirVersions.STU3,
|
|
35
|
+
fhirResource: stu3Example1,
|
|
36
|
+
fhirIcons: MedicationStatementIcon,
|
|
39
37
|
};
|
|
40
38
|
|
|
41
|
-
export const Example2OfSTU3 = ()
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
fhirResource={fhirResource}
|
|
47
|
-
fhirIcons={fhirIcons}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
39
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
40
|
+
Example2OfSTU3.args = {
|
|
41
|
+
fhirVersion: fhirVersions.STU3,
|
|
42
|
+
fhirResource: stu3Example2,
|
|
43
|
+
fhirIcons: fhirIcons,
|
|
50
44
|
};
|
|
51
45
|
|
|
52
|
-
export const Example1OfR4 = ()
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
fhirResource={fhirResource}
|
|
58
|
-
fhirIcons={false}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
46
|
+
export const Example1OfR4 = Template.bind({});
|
|
47
|
+
Example1OfR4.args = {
|
|
48
|
+
fhirVersion: fhirVersions.R4,
|
|
49
|
+
fhirResource: r4Example1,
|
|
50
|
+
fhirIcons: false,
|
|
61
51
|
};
|
|
62
52
|
|
|
63
|
-
export const Example2OfR4 = ()
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
fhirResource={fhirResource}
|
|
69
|
-
fhirIcons={'random text'}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
53
|
+
export const Example2OfR4 = Template.bind({});
|
|
54
|
+
Example2OfR4.args = {
|
|
55
|
+
fhirVersion: fhirVersions.R4,
|
|
56
|
+
fhirResource: r4Example2,
|
|
57
|
+
fhirIcons: 'random text',
|
|
72
58
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Observation from './Observation';
|
|
5
5
|
|
|
@@ -15,51 +15,57 @@ import example3ObservationExcessR4 from '../../../fixtures/r4/resources/observat
|
|
|
15
15
|
import ObservationIcon from '../../../assets/containers/Observation/observation.svg';
|
|
16
16
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
17
17
|
|
|
18
|
-
export default {
|
|
18
|
+
export default {
|
|
19
|
+
title: 'Observation',
|
|
20
|
+
component: Observation,
|
|
21
|
+
argTypes: {
|
|
22
|
+
...defaultArgTypes,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const Template = args => <Observation {...args} />;
|
|
19
27
|
|
|
20
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
fhirResource={fhirResource}
|
|
25
|
-
fhirIcons={require('../../../assets/containers/Observation/observation.svg')}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
29
|
+
DefaultVisualizationDSTU2.args = {
|
|
30
|
+
fhirResource: exampleObservationIssued,
|
|
31
|
+
fhirIcons: require('../../../assets/containers/Observation/observation.svg'),
|
|
28
32
|
};
|
|
29
33
|
|
|
30
|
-
export const ExampleWithoutIssuedDSTU2 = ()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
);
|
|
34
|
+
export const ExampleWithoutIssuedDSTU2 = Template.bind({});
|
|
35
|
+
ExampleWithoutIssuedDSTU2.args = {
|
|
36
|
+
fhirResource: exampleObservation,
|
|
37
|
+
fhirIcons: ObservationIcon,
|
|
35
38
|
};
|
|
36
39
|
|
|
37
|
-
export const ExampleWithIssuedSTU3 = ()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
export const ExampleWithIssuedSTU3 = Template.bind({});
|
|
41
|
+
ExampleWithIssuedSTU3.args = {
|
|
42
|
+
fhirResource: exampleObservationExcessSTU3,
|
|
43
|
+
fhirIcons: fhirIcons,
|
|
40
44
|
};
|
|
41
45
|
|
|
42
|
-
export const ExampleWithoutIssuedSTU3 = ()
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
export const ExampleWithoutIssuedSTU3 = Template.bind({});
|
|
47
|
+
ExampleWithoutIssuedSTU3.args = {
|
|
48
|
+
fhirResource: exampleObservationSTU3,
|
|
49
|
+
fhirIcons: false,
|
|
45
50
|
};
|
|
46
51
|
|
|
47
|
-
export const Example3OfSTU3 = ()
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
export const Example3OfSTU3 = Template.bind({});
|
|
53
|
+
Example3OfSTU3.args = {
|
|
54
|
+
fhirResource: example3ObservationExcessSTU3,
|
|
55
|
+
fhirIcons: 'random text',
|
|
50
56
|
};
|
|
51
57
|
|
|
52
|
-
export const Example1OfR4 = ()
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
export const Example1OfR4 = Template.bind({});
|
|
59
|
+
Example1OfR4.args = {
|
|
60
|
+
fhirResource: example1ObservationExcessR4,
|
|
55
61
|
};
|
|
56
62
|
|
|
57
|
-
export const Example2OfR4 = ()
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
export const Example2OfR4 = Template.bind({});
|
|
64
|
+
Example2OfR4.args = {
|
|
65
|
+
fhirResource: example2ObservationExcessR4,
|
|
60
66
|
};
|
|
61
67
|
|
|
62
|
-
export const Example3OfR4 = ()
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
export const Example3OfR4 = Template.bind({});
|
|
69
|
+
Example3OfR4.args = {
|
|
70
|
+
fhirResource: example3ObservationExcessR4,
|
|
65
71
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Organization from './Organization';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -19,69 +19,57 @@ import OrganizationIcon from '../../../assets/containers/Organization/organizati
|
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
21
|
title: 'Organization',
|
|
22
|
+
component: Organization,
|
|
23
|
+
argTypes: {
|
|
24
|
+
...defaultArgTypes,
|
|
25
|
+
},
|
|
22
26
|
};
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
28
|
+
const Template = args => <Organization {...args} />;
|
|
29
|
+
|
|
30
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
31
|
+
DefaultVisualizationDSTU2.args = {
|
|
32
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
33
|
+
fhirResource: dstu2Example1,
|
|
34
|
+
fhirIcons: require('../../../assets/containers/Organization/organization.svg'),
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
export const Example2OfDSTU2 = ()
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
41
|
-
fhirIcons={fhirIcons}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
37
|
+
export const Example2OfDSTU2 = Template.bind({});
|
|
38
|
+
Example2OfDSTU2.args = {
|
|
39
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
40
|
+
fhirResource: dstu2Example2,
|
|
41
|
+
fhirIcons: OrganizationIcon,
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
export const Example1OfSTU3 = ()
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
fhirVersion={fhirVersions.STU3}
|
|
52
|
-
fhirIcons={false}
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
44
|
+
export const Example1OfSTU3 = Template.bind({});
|
|
45
|
+
Example1OfSTU3.args = {
|
|
46
|
+
fhirVersion: fhirVersions.STU3,
|
|
47
|
+
fhirResource: stu3Example1,
|
|
48
|
+
fhirIcons: fhirIcons,
|
|
55
49
|
};
|
|
56
50
|
|
|
57
|
-
export const Example2OfSTU3 = ()
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
fhirVersion={fhirVersions.STU3}
|
|
63
|
-
fhirIcons={'random text'}
|
|
64
|
-
/>
|
|
65
|
-
);
|
|
51
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
52
|
+
Example2OfSTU3.args = {
|
|
53
|
+
fhirVersion: fhirVersions.STU3,
|
|
54
|
+
fhirResource: stu3Example2,
|
|
55
|
+
fhirIcons: false,
|
|
66
56
|
};
|
|
67
57
|
|
|
68
|
-
export const Example1OfR4 = ()
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
export const Example1OfR4 = Template.bind({});
|
|
59
|
+
Example1OfR4.args = {
|
|
60
|
+
fhirVersion: fhirVersions.R4,
|
|
61
|
+
fhirResource: r4Example1,
|
|
62
|
+
fhirIcons: 'random text',
|
|
73
63
|
};
|
|
74
64
|
|
|
75
|
-
export const Example2OfR4 = ()
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
);
|
|
65
|
+
export const Example2OfR4 = Template.bind({});
|
|
66
|
+
Example2OfR4.args = {
|
|
67
|
+
fhirVersion: fhirVersions.R4,
|
|
68
|
+
fhirResource: r4Example2,
|
|
80
69
|
};
|
|
81
70
|
|
|
82
|
-
export const Example3OfR4 = ()
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
71
|
+
export const Example3OfR4 = Template.bind({});
|
|
72
|
+
Example3OfR4.args = {
|
|
73
|
+
fhirVersion: fhirVersions.R4,
|
|
74
|
+
fhirResource: r4Example3,
|
|
87
75
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Patient from './Patient';
|
|
5
5
|
|
|
@@ -15,44 +15,52 @@ import example3PatientR4 from '../../../fixtures/r4/resources/patient/example3.j
|
|
|
15
15
|
import PatientIcon from '../../../assets/containers/Patient/patient.svg';
|
|
16
16
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
17
17
|
|
|
18
|
-
export default {
|
|
18
|
+
export default {
|
|
19
|
+
title: 'Patient',
|
|
20
|
+
component: Patient,
|
|
21
|
+
argTypes: {
|
|
22
|
+
...defaultArgTypes,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const Template = args => <Patient {...args} />;
|
|
19
27
|
|
|
20
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
fhirResource={fhirResource}
|
|
25
|
-
fhirIcons={require('../../../assets/containers/Patient/patient.svg')}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
29
|
+
DefaultVisualizationDSTU2.args = {
|
|
30
|
+
fhirResource: examplePatient,
|
|
31
|
+
fhirIcons: require('../../../assets/containers/Patient/patient.svg'),
|
|
28
32
|
};
|
|
29
33
|
|
|
30
|
-
export const Example2OfDSTU2 = ()
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
export const Example2OfDSTU2 = Template.bind({});
|
|
35
|
+
Example2OfDSTU2.args = {
|
|
36
|
+
fhirResource: example2PatientDSTU2,
|
|
37
|
+
fhirIcons: PatientIcon,
|
|
33
38
|
};
|
|
34
39
|
|
|
35
|
-
export const ExampleSTU3 = ()
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
export const ExampleSTU3 = Template.bind({});
|
|
41
|
+
ExampleSTU3.args = {
|
|
42
|
+
fhirResource: examplePatientSTU3,
|
|
43
|
+
fhirIcons: fhirIcons,
|
|
38
44
|
};
|
|
39
45
|
|
|
40
|
-
export const Example2STU3 = ()
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
export const Example2STU3 = Template.bind({});
|
|
47
|
+
Example2STU3.args = {
|
|
48
|
+
fhirResource: example2PatientSTU3,
|
|
49
|
+
fhirIcons: false,
|
|
43
50
|
};
|
|
44
51
|
|
|
45
|
-
export const Example1R4 = ()
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
export const Example1R4 = Template.bind({});
|
|
53
|
+
Example1R4.args = {
|
|
54
|
+
fhirResource: example1PatientR4,
|
|
55
|
+
fhirIcons: 'random text',
|
|
48
56
|
};
|
|
49
57
|
|
|
50
|
-
export const Example2R4 = ()
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
export const Example2R4 = Template.bind({});
|
|
59
|
+
Example2R4.args = {
|
|
60
|
+
fhirResource: example2PatientR4,
|
|
53
61
|
};
|
|
54
62
|
|
|
55
|
-
export const Example3R4 = ()
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
export const Example3R4 = Template.bind({});
|
|
64
|
+
Example3R4.args = {
|
|
65
|
+
fhirResource: example3PatientR4,
|
|
58
66
|
};
|