@smile-cdr/fhirts 1.4.2 → 1.4.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.5
4
+
5
+ ### Updates (R3)
6
+
7
+ * Added optional date type properties to FHIR dateTime/Date properties for easier parsing on the front-end side.
8
+
9
+ ## 1.4.4
10
+
11
+ ### Updates (R3)
12
+
13
+ * Fixed typo in `CommunicationRequest.recipient` (was previously `CommunicationRequest.recipent`)
14
+
15
+ ## 1.4.3
16
+
17
+ ### Updates (R4)
18
+
19
+ * Updated `_short` property to `short` used in `elementDefinition.ts` for R4.
20
+ * Updated `_abstract` property to `abstract` used in `structureDefinition.ts, valueSetContains.ts and IStructureDefinition.ts` for R4.
21
+
3
22
  ## 1.4.2
4
23
 
5
24
  ### Updates (R3)
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # FHIR TypeScript / JavaScript Library For Front End Applications
2
2
 
3
- ![npm](https://img.shields.io/npm/v/@smile-cdr/fhirts) ![workflow](https://github.com/smilecdr/FHIR.ts/actions/workflows/npm-publish.yml/badge.svg)
3
+ ![npm](https://img.shields.io/npm/v/@smile-cdr/fhirts) ![workflow](https://github.com/smilecdr/FHIR.ts/actions/workflows/npm-publish.yml/badge.svg) [![NPM](https://img.shields.io/npm/l/@smile-cdr/fhirts)](./LICENSE)
4
4
 
5
5
  ## About
6
6
 
@@ -33,3 +33,5 @@ Checkout the [Getting Started section](GETTINGSTARTED.md) for how to use the lib
33
33
  4. Push changes & create a Pull Request.
34
34
 
35
35
 
36
+
37
+
package/dist/FHIR-R3.d.ts CHANGED
@@ -80,7 +80,7 @@ export declare class Address extends FHIRElement {
80
80
  }
81
81
  export declare class Meta extends FHIRElement {
82
82
  versionId: string;
83
- lastUpdated: string;
83
+ lastUpdated: string | Date;
84
84
  profile: string;
85
85
  security: Coding;
86
86
  tag: Coding;
@@ -90,8 +90,8 @@ export declare class CodeableConcept extends FHIRElement {
90
90
  text: string;
91
91
  }
92
92
  export declare class Period extends FHIRElement {
93
- start: string;
94
- end: string;
93
+ start: string | Date;
94
+ end: string | Date;
95
95
  }
96
96
  export declare class Quantity extends FHIRElement {
97
97
  value: number;
@@ -344,8 +344,8 @@ export declare class Restriction extends BackboneElement {
344
344
  export declare class AvailableTime extends BackboneElement {
345
345
  daysOfWeek: string[];
346
346
  allDay: boolean;
347
- availableStartTime: string;
348
- availableEndTime: string;
347
+ availableStartTime: string | Date;
348
+ availableEndTime: string | Date;
349
349
  }
350
350
  export declare class NotAvailable extends BackboneElement {
351
351
  description: string;
@@ -514,12 +514,12 @@ export declare class Questionnaire extends Resource {
514
514
  title: string;
515
515
  status: string;
516
516
  experimental: boolean;
517
- date: string;
517
+ date: string | Date;
518
518
  publisher: string;
519
519
  description: string;
520
520
  purpose: string;
521
- rovalDate: string;
522
- lastReviewedDate: string;
521
+ rovalDate: string | Date;
522
+ lastReviewedDate: string | Date;
523
523
  effectivePeriod: Period;
524
524
  useContext: UsageContext[];
525
525
  jurisdiction: CodeableConcept[];
@@ -535,7 +535,7 @@ export declare class Patient extends Resource {
535
535
  name: HumanName[];
536
536
  telecom: ContactPoint[];
537
537
  gender: Code;
538
- birthDate: string;
538
+ birthDate: string | Date;
539
539
  address: Address;
540
540
  maritalStatus: CodeableConcept;
541
541
  contact: Contact[];
@@ -795,7 +795,7 @@ export declare class Practitioner extends Resource {
795
795
  telecom: ContactPoint[];
796
796
  address: Address[];
797
797
  gender: string;
798
- birthDate: string;
798
+ birthDate: string | Date;
799
799
  photo: Attachment[];
800
800
  qualification: Qualification[];
801
801
  communication: CodeableConcept[];
@@ -860,13 +860,13 @@ export declare class Immunization extends Resource {
860
860
  vaccineCode: CodeableConcept;
861
861
  patient: Reference;
862
862
  encounter: Reference;
863
- date: string;
863
+ date: string | Date;
864
864
  primarySource: boolean;
865
865
  reportOrigin: CodeableConcept;
866
866
  location: Reference;
867
867
  manufacturer: Reference;
868
868
  lotNumber: string;
869
- expirationDate: string;
869
+ expirationDate: string | Date;
870
870
  site: CodeableConcept;
871
871
  route: CodeableConcept;
872
872
  doseQuantity: DoseCoding;
@@ -885,7 +885,7 @@ export declare class CommunicationRequest extends Resource {
885
885
  priority: string;
886
886
  medium: CodeableConcept[];
887
887
  subject: Reference;
888
- recipent: Reference[];
888
+ recipient: Reference[];
889
889
  topic: Reference[];
890
890
  context: Reference[];
891
891
  payload: Payload[];
@@ -978,9 +978,9 @@ export declare class ClinicalImpression extends Resource {
978
978
  description: string;
979
979
  subject: Reference;
980
980
  context: Reference;
981
- effectiveDateTime: string;
981
+ effectiveDateTime: string | Date;
982
982
  effectivePeriod: Period;
983
- date: string;
983
+ date: string | Date;
984
984
  assessor: Reference;
985
985
  previous: Reference;
986
986
  problem: Reference[];
@@ -98,7 +98,7 @@ export declare class ElementDefinition {
98
98
  /**
99
99
  * A concise description of what this element means (e.g. for use in autogenerated summaries).
100
100
  */
101
- _short?: string;
101
+ short?: string;
102
102
  /**
103
103
  * Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).
104
104
  */
@@ -141,7 +141,7 @@ export declare class StructureDefinition {
141
141
  /**
142
142
  * Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.
143
143
  */
144
- _abstract?: boolean;
144
+ abstract?: boolean;
145
145
  /**
146
146
  * Identifies the types of resource or data type elements to which the extension can be applied.
147
147
  */
@@ -36,7 +36,7 @@ export declare class ValueSetContains {
36
36
  /**
37
37
  * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.
38
38
  */
39
- _abstract?: boolean;
39
+ abstract?: boolean;
40
40
  /**
41
41
  * If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).
42
42
  */
@@ -141,7 +141,7 @@ export interface IStructureDefinition {
141
141
  /**
142
142
  * Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.
143
143
  */
144
- _abstract?: boolean;
144
+ abstract?: boolean;
145
145
  /**
146
146
  * Identifies the types of resource or data type elements to which the extension can be applied.
147
147
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smile-cdr/fhirts",
3
- "version": "1.4.2",
3
+ "version": "1.4.5",
4
4
  "description": "Fhir ts/js library for frontend apps",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
package/src/FHIR-R3.ts CHANGED
@@ -115,7 +115,7 @@ export class Address extends FHIRElement {
115
115
 
116
116
  export class Meta extends FHIRElement {
117
117
  versionId: string;
118
- lastUpdated: string;
118
+ lastUpdated: string | Date;
119
119
  profile: string;
120
120
  security: Coding;
121
121
  tag: Coding;
@@ -127,8 +127,8 @@ export class CodeableConcept extends FHIRElement {
127
127
  }
128
128
 
129
129
  export class Period extends FHIRElement {
130
- start: string;
131
- end: string;
130
+ start: string | Date;
131
+ end: string | Date;
132
132
  }
133
133
 
134
134
  export class Quantity extends FHIRElement {
@@ -466,8 +466,8 @@ export class Restriction extends BackboneElement {
466
466
  export class AvailableTime extends BackboneElement {
467
467
  daysOfWeek: string[];
468
468
  allDay: boolean;
469
- availableStartTime: string;
470
- availableEndTime: string;
469
+ availableStartTime: string | Date;
470
+ availableEndTime: string | Date;
471
471
  }
472
472
 
473
473
  export class NotAvailable extends BackboneElement {
@@ -656,12 +656,12 @@ export class Questionnaire extends Resource {
656
656
  // TODO - fix Code and change status to type Code
657
657
  status: string;
658
658
  experimental: boolean;
659
- date: string;
659
+ date: string | Date;
660
660
  publisher: string;
661
661
  description: string;
662
662
  purpose: string;
663
- rovalDate: string;
664
- lastReviewedDate: string;
663
+ rovalDate: string | Date;
664
+ lastReviewedDate: string | Date;
665
665
  effectivePeriod: Period;
666
666
  useContext: UsageContext[];
667
667
  jurisdiction: CodeableConcept[];
@@ -679,7 +679,7 @@ export class Patient extends Resource {
679
679
  name: HumanName[];
680
680
  telecom: ContactPoint[];
681
681
  gender: Code;
682
- birthDate: string;
682
+ birthDate: string | Date;
683
683
  address: Address;
684
684
  maritalStatus: CodeableConcept;
685
685
  contact: Contact[];
@@ -959,7 +959,7 @@ export class Practitioner extends Resource {
959
959
  telecom: ContactPoint[];
960
960
  address: Address[];
961
961
  gender: string;
962
- birthDate: string;
962
+ birthDate: string | Date;
963
963
  photo: Attachment[];
964
964
  qualification: Qualification[];
965
965
  communication: CodeableConcept[];
@@ -1027,13 +1027,13 @@ export class Immunization extends Resource {
1027
1027
  vaccineCode: CodeableConcept;
1028
1028
  patient: Reference;
1029
1029
  encounter: Reference;
1030
- date: string;
1030
+ date: string | Date;
1031
1031
  primarySource: boolean;
1032
1032
  reportOrigin: CodeableConcept;
1033
1033
  location: Reference;
1034
1034
  manufacturer: Reference;
1035
1035
  lotNumber: string;
1036
- expirationDate: string;
1036
+ expirationDate: string | Date;
1037
1037
  site: CodeableConcept;
1038
1038
  route: CodeableConcept;
1039
1039
  doseQuantity: DoseCoding;
@@ -1053,7 +1053,7 @@ export class CommunicationRequest extends Resource {
1053
1053
  priority: string;
1054
1054
  medium: CodeableConcept[];
1055
1055
  subject: Reference;
1056
- recipent: Reference[];
1056
+ recipient: Reference[];
1057
1057
  topic: Reference[];
1058
1058
  context: Reference[];
1059
1059
  payload: Payload[];
@@ -1153,9 +1153,9 @@ export class ClinicalImpression extends Resource {
1153
1153
  description: string;
1154
1154
  subject: Reference;
1155
1155
  context: Reference;
1156
- effectiveDateTime: string;
1156
+ effectiveDateTime: string | Date;
1157
1157
  effectivePeriod: Period;
1158
- date: string;
1158
+ date: string | Date;
1159
1159
  assessor: Reference;
1160
1160
  previous: Reference;
1161
1161
  problem: Reference[];
@@ -100,7 +100,7 @@ export class ElementDefinition {
100
100
  /**
101
101
  * A concise description of what this element means (e.g. for use in autogenerated summaries).
102
102
  */
103
- _short?: string;
103
+ short?: string;
104
104
  /**
105
105
  * Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).
106
106
  */
@@ -144,7 +144,7 @@ export class StructureDefinition {
144
144
  /**
145
145
  * Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.
146
146
  */
147
- _abstract?: boolean;
147
+ abstract?: boolean;
148
148
  /**
149
149
  * Identifies the types of resource or data type elements to which the extension can be applied.
150
150
  */
@@ -38,7 +38,7 @@ export class ValueSetContains {
38
38
  /**
39
39
  * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.
40
40
  */
41
- _abstract?: boolean;
41
+ abstract?: boolean;
42
42
  /**
43
43
  * If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).
44
44
  */
@@ -144,7 +144,7 @@ export interface IStructureDefinition {
144
144
  /**
145
145
  * Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.
146
146
  */
147
- _abstract?: boolean;
147
+ abstract?: boolean;
148
148
  /**
149
149
  * Identifies the types of resource or data type elements to which the extension can be applied.
150
150
  */