oro-sdk-apis 1.35.0-dev1 → 1.35.0-dev2

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.
@@ -1,5 +1,5 @@
1
1
  import { APIService } from './api';
2
- import { Uuid, Consult, ConsultRequest, MedicalStatus, ConsultTransmission, TransmissionStatus } from '../models';
2
+ import { Uuid, Consult, ConsultRequest, MedicalStatus, ConsultTransmission, ClosedReasonType, TransmissionStatus } from '../models';
3
3
  export declare class ConsultService {
4
4
  private api;
5
5
  private baseURL;
@@ -43,6 +43,8 @@ export declare class ConsultService {
43
43
  getConsultByUUID(uuidConsult: Uuid, uuidPractice?: Uuid): Promise<Consult>;
44
44
  updateConsultByUUID(uuidConsult: Uuid, consult: {
45
45
  statusMedical?: MedicalStatus;
46
+ closedReasonType?: ClosedReasonType;
47
+ closedReasonDescription?: string;
46
48
  uuidAssignedDoctor?: Uuid;
47
49
  neverExpires?: boolean;
48
50
  }, uuidPractice?: Uuid, uuidRequester?: Uuid): Promise<Consult>;
@@ -1,11 +1,11 @@
1
1
  import { APIService } from './api';
2
- import { Consult, DataCreateResponse, LockboxDataRequest, MedicalStatus, Uuid, ResumeConsultEmailRequest } from '../models';
2
+ import { ClosedReasonType, Consult, DataCreateResponse, LockboxDataRequest, MedicalStatus, ResumeConsultEmailRequest, Uuid } from '../models';
3
3
  export declare class TellerService {
4
4
  private api;
5
5
  private baseURL;
6
6
  constructor(api: APIService, baseURL: string);
7
7
  lockboxDataStore(lockboxUuid: Uuid, req: LockboxDataRequest, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
8
- updateConsultByUUID(patientUuid: Uuid, uuidConsult: Uuid, statusMedical: MedicalStatus, neverExpires?: boolean): Promise<Consult>;
8
+ updateConsultByUUID(patientUuid: Uuid, uuidConsult: Uuid, statusMedical: MedicalStatus, closedReasonType?: ClosedReasonType, closedReasonDescription?: string, neverExpires?: boolean): Promise<Consult>;
9
9
  /**
10
10
  * This function notifies teller that the fax sent for a specific consult did not get through
11
11
  * @todo - Make service only exposed route
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.35.0-dev1",
2
+ "version": "1.35.0-dev2",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -82,6 +82,63 @@ export enum TaskStatus {
82
82
  Done = 'Done',
83
83
  }
84
84
 
85
+ export enum ClosedReasonType {
86
+ /**
87
+ * A completed consultation
88
+ */
89
+ Completed = "Completed",
90
+ /**
91
+ * The conclusion was that what the patient submitted was not a disease
92
+ */
93
+ NotADisease = "NotADisease",
94
+ /**
95
+ * The consultation was not appropriate for virtual
96
+ */
97
+ NotAppropriateForVirtual = "NotAppropriateForVirtual",
98
+ /**
99
+ * Any other reason why the consultation was closed
100
+ */
101
+ Other = "Other",
102
+ /**
103
+ * A consultation that is required to be done in person
104
+ */
105
+ RequiresInPerson = "RequiresInPerson"
106
+ }
107
+
108
+ export interface ClosedConsultReasonInsertFields {
109
+ /**
110
+ * The uuid of the consultation
111
+ */
112
+ consult_uuid: string
113
+ /**
114
+ * The reason why the consultation was closed
115
+ */
116
+ closed_reason_type: ClosedReasonType
117
+ /**
118
+ * The description why the consultation was closed
119
+ */
120
+ closed_reason_description: string
121
+ /**
122
+ * When the consultation was closed
123
+ */
124
+ created_at: string
125
+ }
126
+
127
+ export interface ConsultClosedReason {
128
+ /**
129
+ * The reason why the consultation was closed
130
+ */
131
+ closedReasonType: ClosedReasonType
132
+ /**
133
+ * The description why the consultation was closed
134
+ */
135
+ closedReasonDescription: string
136
+ /**
137
+ * When the consultation was closed
138
+ */
139
+ createdAt: string
140
+ }
141
+
85
142
  export interface ConsultRequest {
86
143
  uuidPractice: string
87
144
  tagSpecialtyRequired: string
@@ -104,6 +161,7 @@ export interface Consult {
104
161
  statusTask?: TaskStatus
105
162
  hasTransmissions?: boolean
106
163
  assignedAssistant?: ConsultAssignedAssistant[]
164
+ closeConsultReason?: ConsultClosedReason
107
165
  shortId?: string
108
166
  createdAt?: string
109
167
  expiresAt?: string
@@ -66,11 +66,6 @@ export interface Drug extends DrugRequest {
66
66
  createdAt: string
67
67
  }
68
68
 
69
- export enum PrescriptionStatus {
70
- Existing = 'Existing',
71
- Deleted = 'Deleted',
72
- }
73
-
74
69
  export interface PrescriptionRequest {
75
70
  uuid?: string
76
71
  uuidTreatment?: string
@@ -83,7 +78,6 @@ export interface PrescriptionRequest {
83
78
  export interface Prescription extends PrescriptionRequest {
84
79
  uuid: string
85
80
  uuidTreatment: string
86
- status: PrescriptionStatus
87
81
  createdAt: string
88
82
  }
89
83
 
@@ -159,4 +153,4 @@ export interface TreatmentPlansResponseEntry {
159
153
  treatmentPlan: TreatmentPlan
160
154
  }
161
155
 
162
- export interface TreatmentPlansResponse extends Array<TreatmentPlansResponseEntry> {}
156
+ export interface TreatmentPlansResponse extends Array<TreatmentPlansResponseEntry> {}
@@ -5,6 +5,7 @@ import {
5
5
  ConsultRequest,
6
6
  MedicalStatus,
7
7
  ConsultTransmission,
8
+ ClosedReasonType,
8
9
  TransmissionKind,
9
10
  TransmissionStatus,
10
11
  } from '../models'
@@ -141,6 +142,8 @@ export class ConsultService {
141
142
  uuidConsult: Uuid,
142
143
  consult: {
143
144
  statusMedical?: MedicalStatus
145
+ closedReasonType?: ClosedReasonType
146
+ closedReasonDescription?: string
144
147
  uuidAssignedDoctor?: Uuid
145
148
  neverExpires?: boolean
146
149
  },
@@ -1,11 +1,12 @@
1
1
  import { APIService } from './api'
2
2
  import {
3
+ ClosedReasonType,
3
4
  Consult,
4
5
  DataCreateResponse,
5
6
  LockboxDataRequest,
6
7
  MedicalStatus,
7
- Uuid,
8
8
  ResumeConsultEmailRequest,
9
+ Uuid,
9
10
  } from '../models'
10
11
  export class TellerService {
11
12
  constructor(private api: APIService, private baseURL: string) {}
@@ -28,11 +29,15 @@ export class TellerService {
28
29
  patientUuid: Uuid,
29
30
  uuidConsult: Uuid,
30
31
  statusMedical: MedicalStatus,
32
+ closedReasonType?: ClosedReasonType,
33
+ closedReasonDescription?: string,
31
34
  neverExpires?: boolean
32
35
  ): Promise<Consult> {
33
36
  return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, {
34
37
  patientUuid,
35
38
  statusMedical,
39
+ closedReasonType,
40
+ closedReasonDescription,
36
41
  neverExpires,
37
42
  })
38
43
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 ORO Health Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.