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.
Files changed (53) hide show
  1. package/.storybook/main.js +5 -0
  2. package/.storybook/manager.js +6 -0
  3. package/.storybook/preview.js +7 -0
  4. package/README.md +1 -1
  5. package/package.json +5 -4
  6. package/src/components/containers/Accordion/Accordion.stories.js +74 -58
  7. package/src/components/containers/ResourceContainer/ResourceContainer.stories.js +43 -41
  8. package/src/components/defaultArgTypes.js +12 -0
  9. package/src/components/resources/AdverseEvent/AdverseEvent.stories.js +17 -19
  10. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.stories.js +46 -70
  11. package/src/components/resources/Appointment/Appointment.stories.js +51 -62
  12. package/src/components/resources/Binary/Binary.stories.js +27 -21
  13. package/src/components/resources/Bundle/Bundle.stories.js +59 -49
  14. package/src/components/resources/CarePlan/CarePlan.stories.js +44 -54
  15. package/src/components/resources/CareTeam/CareTeam.stories.js +22 -28
  16. package/src/components/resources/Claim/Claim.stories.js +36 -49
  17. package/src/components/resources/ClaimResponse/ClaimResponse.stories.js +42 -52
  18. package/src/components/resources/Condition/Condition.stories.js +47 -62
  19. package/src/components/resources/Coverage/Coverage.stories.js +38 -50
  20. package/src/components/resources/Device/Device.stories.js +40 -52
  21. package/src/components/resources/DiagnosticReport/DiagnosticReport.stories.js +38 -50
  22. package/src/components/resources/DocumentReference/DocumentReference.stories.js +25 -29
  23. package/src/components/resources/Encounter/Encounter.stories.js +43 -59
  24. package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.stories.js +53 -67
  25. package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.stories.js +74 -38
  26. package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.stories.js +22 -28
  27. package/src/components/resources/Generic/Generic.stories.js +21 -12
  28. package/src/components/resources/Goal/Goal.stories.js +35 -49
  29. package/src/components/resources/Immunization/Immunization.stories.js +38 -51
  30. package/src/components/resources/List/List.stories.js +66 -70
  31. package/src/components/resources/Location/Location.stories.js +23 -18
  32. package/src/components/resources/Medication/Medication.stories.js +42 -64
  33. package/src/components/resources/MedicationAdministration/MedicationAdministration.stories.js +32 -46
  34. package/src/components/resources/MedicationDispense/MedicationDispense.stories.js +39 -57
  35. package/src/components/resources/MedicationKnowledge/MedicationKnowledge.stories.js +49 -58
  36. package/src/components/resources/MedicationOrder/MedicationOrder.stories.js +11 -4
  37. package/src/components/resources/MedicationRequest/MedicationRequest.stories.js +27 -30
  38. package/src/components/resources/MedicationStatement/MedicationStatement.stories.js +32 -46
  39. package/src/components/resources/Observation/Observation.stories.js +39 -33
  40. package/src/components/resources/Organization/Organization.stories.js +40 -52
  41. package/src/components/resources/Patient/Patient.stories.js +36 -28
  42. package/src/components/resources/Practitioner/Practitioner.stories.js +39 -52
  43. package/src/components/resources/PractitionerRole/PractitionerRole.stories.js +43 -63
  44. package/src/components/resources/Procedure/Procedure.stories.js +33 -25
  45. package/src/components/resources/Questionnaire/Questionnaire.stories.js +47 -62
  46. package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.stories.js +43 -63
  47. package/src/components/resources/ReferralRequest/ReferralRequest.stories.js +20 -20
  48. package/src/components/resources/RelatedPerson/RelatedPerson.stories.js +26 -30
  49. package/src/components/resources/ResearchStudy/ResearchStudy.stories.js +17 -15
  50. package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +40 -27
  51. package/.storybook/addons.js +0 -1
  52. package/.storybook/config.js +0 -26
  53. package/.storybook/presets.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { object } from '@storybook/addon-knobs';
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
- export const DefaultVisualizationDSTU2 = () => {
23
- const fhirResource = object('Resource', example1Dstu2);
24
- return (
25
- <ExplanationOfBenefit
26
- fhirVersion={fhirVersions.DSTU2}
27
- fhirResource={fhirResource}
28
- fhirIcons={require('../../../assets/containers/ExplanationOfBenefit/explanation-of-benefit.svg')}
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
- const fhirResource = object('Resource', example1Stu3);
35
- return (
36
- <ExplanationOfBenefit
37
- fhirVersion={fhirVersions.STU3}
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
- export const Example2OfSTU3 = () => {
44
- const fhirResource = object('Resource', example2Stu3);
45
- return (
46
- <ExplanationOfBenefit
47
- fhirVersion={fhirVersions.STU3}
48
- fhirResource={fhirResource}
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
- export const PersonPrimaryCoverageR4 = () => {
54
- const fhirResource = object('Resource', example1R4);
55
- return (
56
- <ExplanationOfBenefit
57
- fhirVersion={fhirVersions.R4}
58
- fhirResource={fhirResource}
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
- export const EOBForClaimWithErrorsR4 = () => {
64
- const fhirResource = object('Resource', example2R4);
65
- return (
66
- <ExplanationOfBenefit
67
- fhirVersion={fhirVersions.R4}
68
- fhirResource={fhirResource}
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
- const fhirResource = object('Resource', example1Stu3);
76
- return <ExplanationOfBenefit fhirResource={fhirResource} />;
68
+ export const ExampleWithoutFHIRVersionProperty = Template.bind({});
69
+ ExampleWithoutFHIRVersionProperty.args = {
70
+ fhirResource: example1Stu3,
77
71
  };
78
72
 
79
- export const EOBCarinBlueButtonExample = () => {
80
- const fhirResource = object('Resource', exampleC4BB);
81
- return (
82
- <ExplanationOfBenefit
83
- fhirVersion={fhirVersions.R4}
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
- const fhirResource = object('Resource', exampleC4BBExtendedDiagnosis);
92
- return (
93
- <ExplanationOfBenefit
94
- fhirVersion={fhirVersions.R4}
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
  };
@@ -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 const DefaultExplanationOfBenefitGraph = () => {
35
- return (
36
- <ExplanationOfBenefitGraph
37
- data={CHART_DATA}
38
- margin={{ top: 10, bottom: 10 }}
39
- />
40
- );
32
+ export default {
33
+ title: '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
- return <ExplanationOfBenefitGraph data={CHART_DATA} totalLabel="Custom" />;
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
- return (
49
- <ExplanationOfBenefitGraph
50
- data={CHART_DATA}
51
- margin={{ top: 40, bottom: 40 }}
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
- return (
59
- <ExplanationOfBenefitGraph
60
- data={CHART_DATA}
61
- margin={{ top: 20, bottom: 20 }}
62
- enableLinkLabels
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
- return (
70
- <ExplanationOfBenefitGraph
71
- data={CHART_DATA}
72
- margin={{ top: 20, bottom: 20 }}
73
- enableLinkLabels
74
- enableValueLabels
75
- pieChartProperties={{ startAngle: 90, cornerRadius: 15, borderWidth: 4 }}
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
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { object } from '@storybook/addon-knobs';
2
+ import { defaultArgTypes } from '../../defaultArgTypes';
3
3
 
4
4
  import FamilyMemberHistory from './FamilyMemberHistory';
5
5
  import fhirVersions from '../fhirResourceVersions';
@@ -13,37 +13,31 @@ import FamilyMemberHistoryIcon from '../../../assets/containers/FamilyMemberHist
13
13
 
14
14
  export default {
15
15
  title: 'FamilyMemberHistory',
16
+ component: FamilyMemberHistory,
17
+ argTypes: {
18
+ ...defaultArgTypes,
19
+ },
16
20
  };
17
21
 
18
- export const DefaultVisualizationDSTU2 = () => {
19
- const fhirResource = object('Resource', example1DSTU2);
20
- return (
21
- <FamilyMemberHistory
22
- fhirVersion={fhirVersions.DSTU2}
23
- fhirResource={fhirResource}
24
- fhirIcons={require('../../../assets/containers/FamilyMemberHistory/family-member-history.svg')}
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
- const fhirResource = object('Resource', example1STU3);
31
- return (
32
- <FamilyMemberHistory
33
- fhirVersion={fhirVersions.STU3}
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
- const fhirResource = object('Resource', example2STU3);
42
- return (
43
- <FamilyMemberHistory
44
- fhirVersion={fhirVersions.STU3}
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
  };
@@ -1,19 +1,28 @@
1
1
  import React from 'react';
2
- import { object } from '@storybook/addon-knobs';
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 { title: 'Generic' };
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
- export const DefaultVisualization = () => {
10
- const exampleResource = {
11
- resourceType: 'UnknownResource',
12
- id: '12345',
13
- code: {
14
- text: 'Resource code text',
15
- },
16
- };
17
- const fhirResource = object('Resource', exampleResource);
18
- return <Generic fhirResource={fhirResource} fhirIcons={fhirIcons} />;
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
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { object } from '@storybook/addon-knobs';
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
- export const DefaultVisualizationDSTU2 = () => {
19
- const fhirResource = object('Resource', dstu2Example1);
20
- return (
21
- <Goal
22
- fhirVersion={fhirVersions.DSTU2}
23
- fhirResource={fhirResource}
24
- fhirIcons={require('../../../assets/containers/Goal/goal.svg')}
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
- const fhirResource = object('Resource', dstu2Example2);
31
- return (
32
- <Goal
33
- fhirVersion={fhirVersions.DSTU2}
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
- const fhirResource = object('Resource', stu3Example1);
42
- return (
43
- <Goal
44
- fhirVersion={fhirVersions.STU3}
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
- const fhirResource = object('Resource', r4Example1);
53
- return (
54
- <Goal
55
- fhirVersion={fhirVersions.R4}
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
- const fhirResource = object('Resource', r4Example2);
64
- return (
65
- <Goal
66
- fhirVersion={fhirVersions.R4}
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
- const fhirResource = object('Resource', stu3Example1);
75
- return <Goal fhirResource={fhirResource} fhirIcons={fhirIcons} />;
59
+ export const ExampleWithoutFhirVersionProperty = Template.bind({});
60
+ ExampleWithoutFhirVersionProperty.args = {
61
+ fhirResource: stu3Example1,
76
62
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { object } from '@storybook/addon-knobs';
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
- export const DefaultVisualizationDSTU2 = () => {
21
- const fhirResource = object('Resource', example1);
22
- return (
23
- <Immunization
24
- fhirResource={fhirResource}
25
- fhirVersion={fhirVersions.DSTU2}
26
- fhirIcons={require('../../../assets/containers/Immunization/immunization.svg')}
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
- const fhirResource = object('Resource', example2);
33
- return (
34
- <Immunization
35
- fhirResource={fhirResource}
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
- const fhirResource = object('Resource', stu3Example);
44
- return (
45
- <Immunization
46
- fhirResource={fhirResource}
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
- const fhirResource = object('Resource', r4Example1);
55
- return (
56
- <Immunization
57
- fhirResource={fhirResource}
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
- export const Example2R4 = () => {
64
- const fhirResource = object('Resource', r4Example2);
65
- return (
66
- <Immunization
67
- fhirResource={fhirResource}
68
- fhirVersion={fhirVersions.R4}
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
- export const Example3R4 = () => {
74
- const fhirResource = object('Resource', r4Example3);
75
- return (
76
- <Immunization fhirResource={fhirResource} fhirVersion={fhirVersions.R4} />
77
- );
60
+
61
+ export const Example3R4 = Template.bind({});
62
+ Example3R4.args = {
63
+ fhirVersion: fhirVersions.R4,
64
+ fhirResource: r4Example3,
78
65
  };