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 Practitioner from './Practitioner';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -14,66 +14,53 @@ import r4Example3 from '../../../fixtures/r4/resources/practitioner/example3.jso
|
|
|
14
14
|
import PractitionerIcon from '../../../assets/containers/Practitioner/practitioner.svg';
|
|
15
15
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
16
16
|
|
|
17
|
-
export default {
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Practitioner',
|
|
19
|
+
component: Practitioner,
|
|
20
|
+
argTypes: {
|
|
21
|
+
...defaultArgTypes,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const Template = args => <Practitioner {...args} />;
|
|
18
26
|
|
|
19
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
fhirResource={fhirResource}
|
|
25
|
-
fhirIcons={require('../../../assets/containers/Practitioner/practitioner.svg')}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
27
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
28
|
+
DefaultVisualizationDSTU2.args = {
|
|
29
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
30
|
+
fhirResource: dstu2Example1,
|
|
31
|
+
fhirIcons: require('../../../assets/containers/Practitioner/practitioner.svg'),
|
|
28
32
|
};
|
|
29
33
|
|
|
30
|
-
export const Example2OfDSTU2 = ()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
fhirResource={fhirResource}
|
|
36
|
-
fhirIcons={PractitionerIcon}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
34
|
+
export const Example2OfDSTU2 = Template.bind({});
|
|
35
|
+
Example2OfDSTU2.args = {
|
|
36
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
37
|
+
fhirResource: dstu2Example2,
|
|
38
|
+
fhirIcons: PractitionerIcon,
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export const ExampleOfSTU3 = ()
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
fhirResource={fhirResource}
|
|
47
|
-
fhirIcons={fhirIcons}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
41
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
42
|
+
ExampleOfSTU3.args = {
|
|
43
|
+
fhirVersion: fhirVersions.STU3,
|
|
44
|
+
fhirResource: stu3Example1,
|
|
45
|
+
fhirIcons: fhirIcons,
|
|
50
46
|
};
|
|
51
47
|
|
|
52
|
-
export const Example1OfR4 = ()
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
fhirResource={fhirResource}
|
|
58
|
-
fhirIcons={false}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
48
|
+
export const Example1OfR4 = Template.bind({});
|
|
49
|
+
Example1OfR4.args = {
|
|
50
|
+
fhirVersion: fhirVersions.R4,
|
|
51
|
+
fhirResource: r4Example1,
|
|
52
|
+
fhirIcons: false,
|
|
61
53
|
};
|
|
62
54
|
|
|
63
|
-
export const Example2OfR4 = ()
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
fhirResource={fhirResource}
|
|
69
|
-
fhirIcons={'random text'}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
55
|
+
export const Example2OfR4 = Template.bind({});
|
|
56
|
+
Example2OfR4.args = {
|
|
57
|
+
fhirVersion: fhirVersions.R4,
|
|
58
|
+
fhirResource: r4Example2,
|
|
59
|
+
fhirIcons: 'random text',
|
|
72
60
|
};
|
|
73
61
|
|
|
74
|
-
export const Example3OfR4 = ()
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
);
|
|
62
|
+
export const Example3OfR4 = Template.bind({});
|
|
63
|
+
Example3OfR4.args = {
|
|
64
|
+
fhirVersion: fhirVersions.R4,
|
|
65
|
+
fhirResource: r4Example3,
|
|
79
66
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import PractitionerRole from './PractitionerRole';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -15,79 +15,59 @@ import r4Example4 from '../../../fixtures/r4/resources/practitionerRole/example4
|
|
|
15
15
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
16
16
|
import PractitionerRoleIcon from '../../../assets/containers/PractitionerRole/practitioner-role.svg';
|
|
17
17
|
|
|
18
|
-
export default {
|
|
18
|
+
export default {
|
|
19
|
+
title: 'PractitionerRole',
|
|
20
|
+
component: PractitionerRole,
|
|
21
|
+
argTypes: {
|
|
22
|
+
...defaultArgTypes,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const Template = args => <PractitionerRole {...args} />;
|
|
19
27
|
|
|
20
|
-
export const ExampleOfSTU3 = ()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
fhirResource={fhirResource}
|
|
26
|
-
fhirIcons={require('../../../assets/containers/PractitionerRole/practitioner-role.svg')}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
28
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
29
|
+
ExampleOfSTU3.args = {
|
|
30
|
+
fhirVersion: fhirVersions.STU3,
|
|
31
|
+
fhirResource: stu3Example1,
|
|
32
|
+
fhirIcons: require('../../../assets/containers/PractitionerRole/practitioner-role.svg'),
|
|
29
33
|
};
|
|
30
34
|
|
|
31
|
-
export const Example2OfSTU3 = ()
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fhirResource={fhirResource}
|
|
37
|
-
fhirIcons={PractitionerRoleIcon}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
35
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
36
|
+
Example2OfSTU3.args = {
|
|
37
|
+
fhirVersion: fhirVersions.STU3,
|
|
38
|
+
fhirResource: stu3Example2,
|
|
39
|
+
fhirIcons: PractitionerRoleIcon,
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
export const Example3OfSTU3 = ()
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
fhirResource={fhirResource}
|
|
48
|
-
fhirIcons={fhirIcons}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
42
|
+
export const Example3OfSTU3 = Template.bind({});
|
|
43
|
+
Example3OfSTU3.args = {
|
|
44
|
+
fhirVersion: fhirVersions.STU3,
|
|
45
|
+
fhirResource: stu3Example3,
|
|
46
|
+
fhirIcons: fhirIcons,
|
|
51
47
|
};
|
|
52
48
|
|
|
53
|
-
export const Example1OfR4 = ()
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
fhirResource={fhirResource}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
49
|
+
export const Example1OfR4 = Template.bind({});
|
|
50
|
+
Example1OfR4.args = {
|
|
51
|
+
fhirVersion: fhirVersions.R4,
|
|
52
|
+
fhirResource: r4Example1,
|
|
53
|
+
fhirIcons: false,
|
|
61
54
|
};
|
|
62
55
|
|
|
63
|
-
export const Example2OfR4 = ()
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
fhirResource={fhirResource}
|
|
69
|
-
fhirIcons={false}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
56
|
+
export const Example2OfR4 = Template.bind({});
|
|
57
|
+
Example2OfR4.args = {
|
|
58
|
+
fhirVersion: fhirVersions.R4,
|
|
59
|
+
fhirResource: r4Example2,
|
|
60
|
+
fhirIcons: 'random text',
|
|
72
61
|
};
|
|
73
62
|
|
|
74
|
-
export const Example3OfR4 = ()
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
fhirVersion={fhirVersions.R4}
|
|
79
|
-
fhirResource={fhirResource}
|
|
80
|
-
fhirIcons={'random text'}
|
|
81
|
-
/>
|
|
82
|
-
);
|
|
63
|
+
export const Example3OfR4 = Template.bind({});
|
|
64
|
+
Example3OfR4.args = {
|
|
65
|
+
fhirVersion: fhirVersions.R4,
|
|
66
|
+
fhirResource: r4Example3,
|
|
83
67
|
};
|
|
84
68
|
|
|
85
|
-
export const Example4OfR4 = ()
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
fhirVersion={fhirVersions.R4}
|
|
90
|
-
fhirResource={fhirResource}
|
|
91
|
-
/>
|
|
92
|
-
);
|
|
69
|
+
export const Example4OfR4 = Template.bind({});
|
|
70
|
+
Example4OfR4.args = {
|
|
71
|
+
fhirVersion: fhirVersions.R4,
|
|
72
|
+
fhirResource: r4Example4,
|
|
93
73
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Procedure from './Procedure';
|
|
5
5
|
|
|
@@ -14,39 +14,47 @@ import r4Example3 from '../../../fixtures/r4/resources/procedure/example3.json';
|
|
|
14
14
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
15
15
|
import ProcedureIcon from '../../../assets/containers/Procedure/procedure.svg';
|
|
16
16
|
|
|
17
|
-
export default {
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Procedure',
|
|
19
|
+
component: Procedure,
|
|
20
|
+
argTypes: {
|
|
21
|
+
...defaultArgTypes,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const Template = args => <Procedure {...args} />;
|
|
18
26
|
|
|
19
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
fhirResource={fhirResource}
|
|
24
|
-
fhirIcons={require('../../../assets/containers/Procedure/procedure.svg')}
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
28
|
+
DefaultVisualizationDSTU2.args = {
|
|
29
|
+
fhirResource: example1,
|
|
30
|
+
fhirIcons: require('../../../assets/containers/Procedure/procedure.svg'),
|
|
27
31
|
};
|
|
28
32
|
|
|
29
|
-
export const ExampleOfSTU3 = ()
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
34
|
+
ExampleOfSTU3.args = {
|
|
35
|
+
fhirResource: stu3Example1,
|
|
36
|
+
fhirIcons: ProcedureIcon,
|
|
32
37
|
};
|
|
33
38
|
|
|
34
|
-
export const Example2OfSTU3 = ()
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
40
|
+
Example2OfSTU3.args = {
|
|
41
|
+
fhirResource: stu3Example2,
|
|
42
|
+
fhirIcons: fhirIcons,
|
|
37
43
|
};
|
|
38
44
|
|
|
39
|
-
export const Example1OfR4 = ()
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
export const Example1OfR4 = Template.bind({});
|
|
46
|
+
Example1OfR4.args = {
|
|
47
|
+
fhirResource: r4Example1,
|
|
48
|
+
fhirIcons: false,
|
|
42
49
|
};
|
|
43
50
|
|
|
44
|
-
export const Example2OfR4 = ()
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
export const Example2OfR4 = Template.bind({});
|
|
52
|
+
Example2OfR4.args = {
|
|
53
|
+
fhirResource: r4Example2,
|
|
54
|
+
fhirIcons: 'random text',
|
|
47
55
|
};
|
|
48
56
|
|
|
49
|
-
export const Example3OfR4 = ()
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
export const Example3OfR4 = Template.bind({});
|
|
58
|
+
Example3OfR4.args = {
|
|
59
|
+
fhirResource: r4Example3,
|
|
52
60
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import Questionnaire from './Questionnaire';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -18,80 +18,65 @@ import r4Example3 from '../../../fixtures/r4/resources/questionnaire/example3.js
|
|
|
18
18
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
19
19
|
import QuestionnaireIcon from '../../../assets/containers/Questionnaire/questionnaire.svg';
|
|
20
20
|
|
|
21
|
-
export default {
|
|
21
|
+
export default {
|
|
22
|
+
title: 'Questionnaire',
|
|
23
|
+
component: Questionnaire,
|
|
24
|
+
argTypes: {
|
|
25
|
+
...defaultArgTypes,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const Template = args => <Questionnaire {...args} />;
|
|
22
30
|
|
|
23
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
29
|
-
fhirIcons={require('../../../assets/containers/Questionnaire/questionnaire.svg')}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
31
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
32
|
+
DefaultVisualizationDSTU2.args = {
|
|
33
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
34
|
+
fhirResource: dstu2Example1,
|
|
35
|
+
fhirIcons: require('../../../assets/containers/Questionnaire/questionnaire.svg'),
|
|
32
36
|
};
|
|
33
37
|
|
|
34
|
-
export const Example2OfDSTU2 = ()
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
40
|
-
fhirIcons={QuestionnaireIcon}
|
|
41
|
-
/>
|
|
42
|
-
);
|
|
38
|
+
export const Example2OfDSTU2 = Template.bind({});
|
|
39
|
+
Example2OfDSTU2.args = {
|
|
40
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
41
|
+
fhirResource: dstu2Example2,
|
|
42
|
+
fhirIcons: QuestionnaireIcon,
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export const Example3OfDSTU2 = ()
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
51
|
-
fhirIcons={fhirIcons}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
45
|
+
export const Example3OfDSTU2 = Template.bind({});
|
|
46
|
+
Example3OfDSTU2.args = {
|
|
47
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
48
|
+
fhirResource: dstu2Example3,
|
|
49
|
+
fhirIcons: fhirIcons,
|
|
54
50
|
};
|
|
55
51
|
|
|
56
|
-
export const Example1OfSTU3 = ()
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fhirVersion={fhirVersions.STU3}
|
|
62
|
-
fhirIcons={false}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
52
|
+
export const Example1OfSTU3 = Template.bind({});
|
|
53
|
+
Example1OfSTU3.args = {
|
|
54
|
+
fhirVersion: fhirVersions.STU3,
|
|
55
|
+
fhirResource: stu3Example1,
|
|
56
|
+
fhirIcons: false,
|
|
65
57
|
};
|
|
66
58
|
|
|
67
|
-
export const Example2OfSTU3 = ()
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
fhirVersion={fhirVersions.STU3}
|
|
73
|
-
fhirIcons={'random text'}
|
|
74
|
-
/>
|
|
75
|
-
);
|
|
59
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
60
|
+
Example2OfSTU3.args = {
|
|
61
|
+
fhirVersion: fhirVersions.STU3,
|
|
62
|
+
fhirResource: stu3Example2,
|
|
63
|
+
fhirIcons: 'random text',
|
|
76
64
|
};
|
|
77
65
|
|
|
78
|
-
export const Example1OfR4 = ()
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
);
|
|
66
|
+
export const Example1OfR4 = Template.bind({});
|
|
67
|
+
Example1OfR4.args = {
|
|
68
|
+
fhirVersion: fhirVersions.R4,
|
|
69
|
+
fhirResource: r4Example1,
|
|
83
70
|
};
|
|
84
71
|
|
|
85
|
-
export const Example2OfR4 = ()
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
);
|
|
72
|
+
export const Example2OfR4 = Template.bind({});
|
|
73
|
+
Example2OfR4.args = {
|
|
74
|
+
fhirVersion: fhirVersions.R4,
|
|
75
|
+
fhirResource: r4Example2,
|
|
90
76
|
};
|
|
91
77
|
|
|
92
|
-
export const Example3OfR4 = ()
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
);
|
|
78
|
+
export const Example3OfR4 = Template.bind({});
|
|
79
|
+
Example3OfR4.args = {
|
|
80
|
+
fhirVersion: fhirVersions.R4,
|
|
81
|
+
fhirResource: r4Example3,
|
|
97
82
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import QuestionnaireResponse from './QuestionnaireResponse';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -17,79 +17,59 @@ import r4Example2 from '../../../fixtures/r4/resources/questionnaireResponse/exa
|
|
|
17
17
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
18
18
|
import QuestionnaireResponseIcon from '../../../assets/containers/QuestionnaireResponse/questionnaire-response.svg';
|
|
19
19
|
|
|
20
|
-
export default {
|
|
20
|
+
export default {
|
|
21
|
+
title: 'QuestionnaireResponse',
|
|
22
|
+
component: QuestionnaireResponse,
|
|
23
|
+
argTypes: {
|
|
24
|
+
...defaultArgTypes,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const Template = args => <QuestionnaireResponse {...args} />;
|
|
21
29
|
|
|
22
|
-
export const DefaultVisualizationDSTU2 = ()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
fhirResource={fhirResource}
|
|
28
|
-
fhirIcons={require('../../../assets/containers/QuestionnaireResponse/questionnaire-response.svg')}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
30
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
31
|
+
DefaultVisualizationDSTU2.args = {
|
|
32
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
33
|
+
fhirResource: dstu2Example1,
|
|
34
|
+
fhirIcons: require('../../../assets/containers/QuestionnaireResponse/questionnaire-response.svg'),
|
|
31
35
|
};
|
|
32
36
|
|
|
33
|
-
export const Example2OfDSTU2 = ()
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
fhirResource={fhirResource}
|
|
39
|
-
fhirIcons={QuestionnaireResponseIcon}
|
|
40
|
-
/>
|
|
41
|
-
);
|
|
37
|
+
export const Example2OfDSTU2 = Template.bind({});
|
|
38
|
+
Example2OfDSTU2.args = {
|
|
39
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
40
|
+
fhirResource: dstu2Example2,
|
|
41
|
+
fhirIcons: QuestionnaireResponseIcon,
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
export const Example3OfDSTU2 = ()
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
fhirResource={fhirResource}
|
|
50
|
-
fhirIcons={fhirIcons}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
44
|
+
export const Example3OfDSTU2 = Template.bind({});
|
|
45
|
+
Example3OfDSTU2.args = {
|
|
46
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
47
|
+
fhirResource: dstu2Example3,
|
|
48
|
+
fhirIcons: fhirIcons,
|
|
53
49
|
};
|
|
54
50
|
|
|
55
|
-
export const Example1OfSTU3 = ()
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
fhirResource={fhirResource}
|
|
61
|
-
fhirIcons={false}
|
|
62
|
-
/>
|
|
63
|
-
);
|
|
51
|
+
export const Example1OfSTU3 = Template.bind({});
|
|
52
|
+
Example1OfSTU3.args = {
|
|
53
|
+
fhirVersion: fhirVersions.STU3,
|
|
54
|
+
fhirResource: stu3Example1,
|
|
55
|
+
fhirIcons: false,
|
|
64
56
|
};
|
|
65
57
|
|
|
66
|
-
export const Example2OfSTU3 = ()
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
fhirResource={fhirResource}
|
|
72
|
-
fhirIcons="random text"
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
58
|
+
export const Example2OfSTU3 = Template.bind({});
|
|
59
|
+
Example2OfSTU3.args = {
|
|
60
|
+
fhirVersion: fhirVersions.STU3,
|
|
61
|
+
fhirResource: stu3Example2,
|
|
62
|
+
fhirIcons: 'random text',
|
|
75
63
|
};
|
|
76
64
|
|
|
77
|
-
export const Example1OfR4 = ()
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
fhirVersion={fhirVersions.R4}
|
|
82
|
-
fhirResource={fhirResource}
|
|
83
|
-
/>
|
|
84
|
-
);
|
|
65
|
+
export const Example1OfR4 = Template.bind({});
|
|
66
|
+
Example1OfR4.args = {
|
|
67
|
+
fhirVersion: fhirVersions.R4,
|
|
68
|
+
fhirResource: r4Example1,
|
|
85
69
|
};
|
|
86
70
|
|
|
87
|
-
export const Example2OfR4 = ()
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
fhirVersion={fhirVersions.R4}
|
|
92
|
-
fhirResource={fhirResource}
|
|
93
|
-
/>
|
|
94
|
-
);
|
|
71
|
+
export const Example2OfR4 = Template.bind({});
|
|
72
|
+
Example2OfR4.args = {
|
|
73
|
+
fhirVersion: fhirVersions.R4,
|
|
74
|
+
fhirResource: r4Example2,
|
|
95
75
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import ReferralRequest from './ReferralRequest';
|
|
5
5
|
|
|
@@ -9,29 +9,29 @@ import fhirVersions from '../fhirResourceVersions';
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
title: 'ReferralRequest',
|
|
12
|
+
component: ReferralRequest,
|
|
13
|
+
argTypes: {
|
|
14
|
+
...defaultArgTypes,
|
|
15
|
+
},
|
|
12
16
|
};
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
18
|
+
const Template = args => <ReferralRequest {...args} />;
|
|
19
|
+
|
|
20
|
+
export const DefaultVisualizationDSTU2 = Template.bind({});
|
|
21
|
+
DefaultVisualizationDSTU2.args = {
|
|
22
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
23
|
+
fhirResource: dstu2Example1,
|
|
24
|
+
fhirIcons: require('../../../assets/containers/ReferralRequest/referral-request.svg'),
|
|
22
25
|
};
|
|
23
26
|
|
|
24
|
-
export const ExampleOfSTU3 = ()
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fhirResource={fhirResource}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
27
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
28
|
+
ExampleOfSTU3.args = {
|
|
29
|
+
fhirVersion: fhirVersions.STU3,
|
|
30
|
+
fhirResource: stu3Example1,
|
|
31
|
+
fhirIcons: false,
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export const ExampleWithoutFhirVersionProperty = ()
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
export const ExampleWithoutFhirVersionProperty = Template.bind({});
|
|
35
|
+
ExampleWithoutFhirVersionProperty.args = {
|
|
36
|
+
fhirResource: stu3Example1,
|
|
37
37
|
};
|