@smile-cdr/fhirts 2.0.3 → 2.0.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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.5
4
+
5
+ ### Updates (R3)
6
+
7
+ * `Encounter` class now has all properties defined.
8
+
9
+ ## 2.0.4
10
+
11
+ ### Updates (R4)
12
+
13
+ * `OperationOutcome` class now has `id` set to type `string`. `Resource` class should now support `id`.
14
+
3
15
  ## 2.0.3
4
16
 
5
17
  ### Updates (R4)
package/GETTINGSTARTED.md CHANGED
@@ -83,7 +83,7 @@ function getResourceType(resource:Resource){
83
83
  }
84
84
  }
85
85
  ```
86
- If you try writing this out you will see that the variable `res` inside the `if` block is of type `CarePlan`. This was inferred automatically using the `if` condition (since as per the specification the only resources which can have `resourceType:"CarePlan"` are `CarePlan` resources).
86
+ If you try writing this out you will see that the variable `resource` inside the `if` block is of type `CarePlan`. This was inferred automatically using the `if` condition (since as per the specification the only resources which can have `resourceType:"CarePlan"` are `CarePlan` resources).
87
87
 
88
88
  ## Utilities
89
89
 
package/dist/FHIR-R3.d.ts CHANGED
@@ -659,10 +659,50 @@ export declare class ProcessRequest extends BaseResource {
659
659
  export declare class Encounter extends BaseResource {
660
660
  resourceType: "Encounter";
661
661
  identifier: Identifier[];
662
- status: string;
662
+ status: 'planned' | 'arrived' | 'triaged' | 'in-progress' | 'onleave' | 'finished' | 'cancelled' | 'entered-in-error' | 'unknown';
663
+ statusHistory: {
664
+ status: 'planned' | 'arrived' | 'triaged' | 'in-progress' | 'onleave' | 'finished' | 'cancelled' | 'entered-in-error' | 'unknown';
665
+ period: Period;
666
+ }[];
667
+ class: Coding;
668
+ classHistory: {
669
+ class: Coding;
670
+ period: Period;
671
+ }[];
672
+ type: CodeableConcept[];
673
+ priority: CodeableConcept;
663
674
  episodeOfCare: Reference[];
664
675
  subject: Reference;
676
+ incomingReferral: Reference[];
665
677
  participant: EncounterParticipant[];
678
+ appointment: Reference;
679
+ period: Period;
680
+ length: Quantity;
681
+ reason: CodeableConcept[];
682
+ diagnosis: {
683
+ condition: Reference;
684
+ role: CodeableConcept;
685
+ rank: number;
686
+ }[];
687
+ account: Reference[];
688
+ hospitalization: {
689
+ preAdmissionIdentifer: Identifier;
690
+ origin: Reference;
691
+ admitSource: CodeableConcept;
692
+ reAdmission: CodeableConcept;
693
+ dietPreference: CodeableConcept[];
694
+ specialCourtesy: CodeableConcept[];
695
+ specialArrangement: CodeableConcept[];
696
+ destination: Reference;
697
+ dischargeDiposition: CodeableConcept;
698
+ };
699
+ location: {
700
+ location: Reference;
701
+ status: 'planned' | 'active' | 'reserved' | 'completed';
702
+ period: Period;
703
+ }[];
704
+ serviceProvider: Reference;
705
+ partOf: Reference;
666
706
  }
667
707
  export declare class CareTeamParticipant extends BackboneElement {
668
708
  role: CodeableConcept;
@@ -18,6 +18,10 @@ export declare class OperationOutcome {
18
18
  * This is a OperationOutcome resource
19
19
  */
20
20
  resourceType: 'OperationOutcome';
21
+ /**
22
+ * The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
23
+ */
24
+ id?: string;
21
25
  /**
22
26
  * An error, warning, or information message that results from a system action.
23
27
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smile-cdr/fhirts",
3
- "version": "2.0.3",
3
+ "version": "2.0.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
@@ -813,10 +813,50 @@ export class ProcessRequest extends BaseResource {
813
813
  export class Encounter extends BaseResource {
814
814
  resourceType: "Encounter";
815
815
  identifier: Identifier[];
816
- status: string;
816
+ status: 'planned' | 'arrived' | 'triaged' | 'in-progress' | 'onleave' | 'finished' | 'cancelled' | 'entered-in-error' | 'unknown';
817
+ statusHistory: {
818
+ status:'planned' | 'arrived' | 'triaged' | 'in-progress' | 'onleave' | 'finished' | 'cancelled' | 'entered-in-error' | 'unknown';
819
+ period: Period;
820
+ }[];
821
+ class:Coding;
822
+ classHistory:{
823
+ class:Coding;
824
+ period:Period;
825
+ }[];
826
+ type:CodeableConcept[];
827
+ priority:CodeableConcept;
817
828
  episodeOfCare: Reference[];
818
829
  subject: Reference;
830
+ incomingReferral:Reference[];
819
831
  participant: EncounterParticipant[];
832
+ appointment:Reference;
833
+ period:Period;
834
+ length:Quantity;
835
+ reason:CodeableConcept[];
836
+ diagnosis:{
837
+ condition:Reference;
838
+ role:CodeableConcept;
839
+ rank:number
840
+ }[];
841
+ account:Reference[];
842
+ hospitalization:{
843
+ preAdmissionIdentifer:Identifier;
844
+ origin:Reference;
845
+ admitSource:CodeableConcept;
846
+ reAdmission:CodeableConcept;
847
+ dietPreference:CodeableConcept[];
848
+ specialCourtesy:CodeableConcept[];
849
+ specialArrangement:CodeableConcept[];
850
+ destination:Reference;
851
+ dischargeDiposition:CodeableConcept;
852
+ };
853
+ location:{
854
+ location:Reference;
855
+ status: 'planned' | 'active' | 'reserved' | 'completed';
856
+ period: Period
857
+ }[];
858
+ serviceProvider:Reference;
859
+ partOf:Reference;
820
860
  }
821
861
 
822
862
  export class CareTeamParticipant extends BackboneElement {
@@ -20,6 +20,10 @@ export class OperationOutcome {
20
20
  * This is a OperationOutcome resource
21
21
  */
22
22
  resourceType: 'OperationOutcome';
23
+ /**
24
+ * The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
25
+ */
26
+ id?: string;
23
27
  /**
24
28
  * An error, warning, or information message that results from a system action.
25
29
  */
@@ -1,4 +1,3 @@
1
- import { Patient } from "../../FHIR-R4/classes/patient";
2
1
  import { BundleUtilities } from "./BundleUtilities";
3
2
 
4
3
  const inputPayload = require("./../../test-resources/Bundle-R4.json");