fhir-react 0.3.10 → 0.3.13

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 (77) hide show
  1. package/.storybook/preview.js +49 -0
  2. package/README.md +17 -1
  3. package/build/index.js +9 -9
  4. package/build/style.css +1 -1
  5. package/package.json +1 -1
  6. package/src/components/containers/Accordion/Accordion.js +13 -8
  7. package/src/components/containers/ResourceContainer/ResourceContainer.css +1 -3
  8. package/src/components/datatypes/Date/Date.js +1 -0
  9. package/src/components/datatypes/DatePeriod/DatePeriod.js +2 -2
  10. package/src/components/resources/AdverseEvent/AdverseEvent.js +2 -0
  11. package/src/components/resources/AdverseEvent/AdverseEvent.test.js +2 -2
  12. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.js +21 -2
  13. package/src/components/resources/AllergyIntolerance/AllergyIntolerance.test.js +8 -4
  14. package/src/components/resources/Appointment/Appointment.js +2 -0
  15. package/src/components/resources/Binary/Binary.js +2 -1
  16. package/src/components/resources/CarePlan/CarePlan.js +3 -0
  17. package/src/components/resources/CarePlan/CarePlan.test.js +4 -4
  18. package/src/components/resources/CareTeam/CareTeam.js +2 -0
  19. package/src/components/resources/CareTeam/CareTeam.test.js +4 -4
  20. package/src/components/resources/Claim/Claim.js +3 -0
  21. package/src/components/resources/Claim/Claim.stories.js +1 -1
  22. package/src/components/resources/Claim/Claim.test.js +6 -6
  23. package/src/components/resources/ClaimResponse/ClaimResponse.js +2 -0
  24. package/src/components/resources/ClaimResponse/ClaimResponse.stories.js +1 -1
  25. package/src/components/resources/ClaimResponse/ClaimResponse.test.js +6 -6
  26. package/src/components/resources/Condition/Condition.js +27 -3
  27. package/src/components/resources/Condition/Condition.test.js +5 -5
  28. package/src/components/resources/Coverage/Coverage.js +3 -0
  29. package/src/components/resources/Device/Device.js +3 -0
  30. package/src/components/resources/DiagnosticReport/DiagnosticReport.js +2 -0
  31. package/src/components/resources/DiagnosticReport/DiagnosticReport.test.js +4 -2
  32. package/src/components/resources/DocumentReference/DocumentReference.js +2 -0
  33. package/src/components/resources/Encounter/Encounter.js +2 -0
  34. package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.js +21 -4
  35. package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.test.js +7 -7
  36. package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.stories.js +1 -1
  37. package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.js +2 -0
  38. package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.stories.js +1 -1
  39. package/src/components/resources/Generic/Generic.js +8 -1
  40. package/src/components/resources/Goal/Goal.js +2 -0
  41. package/src/components/resources/Goal/Goal.test.js +2 -2
  42. package/src/components/resources/Immunization/Immunization.js +10 -2
  43. package/src/components/resources/List/List.js +2 -0
  44. package/src/components/resources/Location/Location.js +8 -1
  45. package/src/components/resources/Medication/Medication.js +2 -0
  46. package/src/components/resources/MedicationAdministration/MedicationAdministration.js +4 -2
  47. package/src/components/resources/MedicationAdministration/MedicationAdministration.test.js +7 -7
  48. package/src/components/resources/MedicationDispense/MedicationDispense.js +2 -0
  49. package/src/components/resources/MedicationDispense/MedicationDispense.test.js +2 -2
  50. package/src/components/resources/MedicationKnowledge/MedicationKnowledge.js +2 -0
  51. package/src/components/resources/MedicationOrder/MedicationOrder.js +8 -1
  52. package/src/components/resources/MedicationRequest/MedicationRequest.js +2 -0
  53. package/src/components/resources/MedicationRequest/MedicationRequest.test.js +4 -4
  54. package/src/components/resources/MedicationStatement/MedicationStatement.js +2 -0
  55. package/src/components/resources/Observation/Observation.js +23 -4
  56. package/src/components/resources/Observation/Observation.test.js +1 -1
  57. package/src/components/resources/Organization/Organization.js +2 -0
  58. package/src/components/resources/Patient/Patient.js +3 -1
  59. package/src/components/resources/Patient/Patient.test.js +6 -6
  60. package/src/components/resources/Practitioner/Practitioner.js +4 -0
  61. package/src/components/resources/PractitionerRole/PractitionerRole.js +2 -0
  62. package/src/components/resources/PractitionerRole/PractitionerRole.stories.js +1 -1
  63. package/src/components/resources/Procedure/Procedure.js +8 -1
  64. package/src/components/resources/Procedure/Procedure.test.js +1 -1
  65. package/src/components/resources/Questionnaire/Questionnaire.js +2 -0
  66. package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.js +2 -0
  67. package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.test.js +4 -4
  68. package/src/components/resources/ReferralRequest/ReferralRequest.js +2 -0
  69. package/src/components/resources/RelatedPerson/RelatedPerson.js +2 -0
  70. package/src/components/resources/RelatedPerson/RelatedPerson.stories.js +1 -1
  71. package/src/components/resources/ResearchStudy/ResearchStudy.js +2 -0
  72. package/src/components/resources/ResearchStudy/ResearchStudy.test.js +1 -1
  73. package/src/components/supportedFhirResourceList.js +2 -0
  74. package/src/components/ui/index.js +5 -1
  75. package/src/utils/formatDate.js +3 -0
  76. package/src/utils/formatDate.test.js +2 -2
  77. package/src/utils/getResourceDate.js +9 -0
@@ -5,3 +5,52 @@ import '../src/style.scss';
5
5
  if (typeof document !== 'undefined') {
6
6
  require('bootstrap/dist/js/bootstrap.min.js');
7
7
  }
8
+
9
+ export const parameters = {
10
+ options: {
11
+ storySort: {
12
+ order: [
13
+ 'Patient',
14
+ 'Coverage',
15
+ ['RelatedPerson', 'FamilyMemberHistory'],
16
+ 'ExplanationOfBenefit',
17
+ ['ExplanationOfBenefitGraph', 'Claim', 'ClaimResponse'],
18
+ 'Immunization',
19
+ 'Observation',
20
+ 'Procedure',
21
+ 'Condition',
22
+ 'Encounter',
23
+ 'DiagnosticReport',
24
+ 'DocumentReference',
25
+ 'CarePlan',
26
+ 'Goal',
27
+ 'AllergyIntolerance',
28
+ 'AdverseEvent',
29
+ 'Device',
30
+ 'List',
31
+ 'Medication',
32
+ 'MedicationDispense',
33
+ 'MedicationAdministration',
34
+ 'MedicationOrder',
35
+ 'MedicationRequest',
36
+ 'MedicationStatement',
37
+ 'Practitioner',
38
+ ['PractitionerRole'],
39
+ 'Organization',
40
+ 'CareTeam',
41
+ 'Appointment',
42
+ 'Bundle',
43
+ 'Binary',
44
+ 'ReferralRequest',
45
+ 'Questionnaire',
46
+ 'QuestionnaireResponse',
47
+ 'UnhandledResourceDataStructure',
48
+ 'Generic',
49
+ 'Location',
50
+ 'MedicationKnowledge',
51
+ 'ResearchStudy',
52
+ 'ResourceCategory',
53
+ ],
54
+ },
55
+ },
56
+ };
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![CircleCI](https://circleci.com/gh/1uphealth/fhir-react/tree/master.svg?style=svg)](https://circleci.com/gh/1uphealth/fhir-react/tree/master)
2
- [![Storybook](https://github.com/storybookjs/brand/raw/master/badge/badge-storybook.svg?sanitize=true)](https://fhir-react-lib-test-storybook.s3.amazonaws.com/branch/release-0-3-10/index.html)
2
+ [![Storybook](https://github.com/storybookjs/brand/raw/master/badge/badge-storybook.svg?sanitize=true)](https://fhir-react-lib-test-storybook.s3.amazonaws.com/branch/release-0-3-13/index.html)
3
3
 
4
4
  # fhir-react
5
5
 
@@ -157,6 +157,22 @@ const MyComponent = () => {
157
157
  };
158
158
  ```
159
159
 
160
+ User can provide a number that can be assigned at the end of Accordion id. Not providing any number will cause a lodash uniqueId function to be used instead (default functionality up to this point).
161
+
162
+ ```jsx
163
+ const MyComponent = () => {
164
+ const fhirResource = JSON.parse(fhirResourceAsJsonString);
165
+
166
+ return (
167
+ <FhirResource
168
+ fhirResource={fhirResource}
169
+ fhirVersion={fhirVersions.R4}
170
+ customId={id}
171
+ />
172
+ );
173
+ };
174
+ ```
175
+
160
176
  ### `FhirResource` component props
161
177
 
162
178
  | Prop | Type | Default | Description |