oro-sdk-apis 1.24.1 → 1.27.0-dev1

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/README.md CHANGED
@@ -36,6 +36,8 @@ In all cases (node.js or app), you need to use:
36
36
  npm run link:watch
37
37
  ```
38
38
 
39
+ Make sure that you are using the same version of node and npm in the SDK and in the service that you are trying to link.
40
+
39
41
  ### Publishing package
40
42
 
41
43
  1. (Only first time) Locally run `npm login` and use the creds in 1password (tech-team-oro) . This will create ~/.npmrc . You will require a OTP but it's sent on tech@orohealth.me so you should all have it.
@@ -74,6 +74,13 @@ export declare enum TaskStatus {
74
74
  Blocked = "Blocked",
75
75
  Done = "Done"
76
76
  }
77
+ export declare enum ReasonWhyClosed {
78
+ Completed = "Completed",
79
+ NotADisease = "NotADisease",
80
+ NotAppropriateForVirtual = "NotAppropriateForVirtual",
81
+ Other = "Other",
82
+ RequiresInPerson = "RequiresInPerson"
83
+ }
77
84
  export interface ConsultRequest {
78
85
  uuidPractice: string;
79
86
  tagSpecialtyRequired: string;
@@ -94,6 +101,8 @@ export interface Consult {
94
101
  uuidAssignedDoctor: string;
95
102
  uuidCurrentAssigned: string;
96
103
  statusTask?: TaskStatus;
104
+ reasonWhyClosed?: ReasonWhyClosed;
105
+ reasonWhyOther?: string;
97
106
  hasTransmissions?: boolean;
98
107
  assignedAssistant?: ConsultAssignedAssistant[];
99
108
  shortId?: string;
@@ -110,10 +110,11 @@ export interface PracticeAccount {
110
110
  export declare enum PracticeConfigKind {
111
111
  PractitionerConsultList = "PractitionerConsultList",
112
112
  PractitionerChatbox = "PractitionerChatbox",
113
- PracticeTheme = "PracticeTheme",
113
+ PracticeConfigExample = "PracticeConfigExample",
114
114
  PracticeLocaleSwitcher = "PracticeLocaleSwitcher",
115
115
  PracticeCookieBanner = "PracticeCookieBanner",
116
- PracticePharmacyPicker = "PracticePharmacyPicker"
116
+ PracticePharmacyPicker = "PracticePharmacyPicker",
117
+ PracticeCssVariables = "PracticeCssVariables"
117
118
  }
118
119
  export interface PracticeConfig<K, T> {
119
120
  uuidPractice: string;
@@ -124,6 +125,7 @@ export declare type PracticeConfigPractitionerConsultList = PracticeConfig<Pract
124
125
  hideLocality?: boolean;
125
126
  hideFax?: boolean;
126
127
  hideExpiresAt?: boolean;
128
+ showExpirationInDays?: boolean;
127
129
  }>;
128
130
  export declare type PracticeConfigPracticeLocaleSwitcher = PracticeConfig<PracticeConfigKind.PracticeLocaleSwitcher, {
129
131
  hideLocaleSwitcher?: boolean;
@@ -147,10 +149,15 @@ export declare type PracticeConfigPracticeCookieBanner = PracticeConfig<Practice
147
149
  policyLink?: string;
148
150
  useOfCookieLink?: string;
149
151
  }>;
150
- export declare type PracticeConfigPracticeTheme = PracticeConfig<PracticeConfigKind.PracticeTheme, {
152
+ export declare type PracticeConfigPracticeConfigExample = PracticeConfig<PracticeConfigKind.PracticeConfigExample, {
151
153
  primaryColor?: string;
152
154
  }>;
153
- export declare type PracticeConfigs = PracticeConfigPractitionerConsultList | PracticeConfigPractitionerChatbox | PracticeConfigPracticeLocaleSwitcher | PracticeConfigPracticeCookieBanner | PracticeConfigPracticeOnlinePharmacy | PracticeConfigPracticeTheme;
155
+ /**
156
+ * This interface describes all practice css variables
157
+ * The keys should reflect the exact css name
158
+ */
159
+ export declare type PracticeConfigPracticeCssVariables = PracticeConfig<PracticeConfigKind.PracticeCssVariables, Record<string, string>>;
160
+ export declare type PracticeConfigs = PracticeConfigPractitionerConsultList | PracticeConfigPractitionerChatbox | PracticeConfigPracticeLocaleSwitcher | PracticeConfigPracticeCookieBanner | PracticeConfigPracticeOnlinePharmacy | PracticeConfigPracticeCssVariables | PracticeConfigPracticeConfigExample;
154
161
  export interface PracticeWorkflow {
155
162
  id?: number;
156
163
  uuidPractice: string;
@@ -331,10 +338,11 @@ export interface Practitioner {
331
338
  export interface HydratedPracticeConfigs {
332
339
  [PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList;
333
340
  [PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox;
334
- [PracticeConfigKind.PracticeTheme]?: PracticeConfigPracticeTheme;
341
+ [PracticeConfigKind.PracticeConfigExample]?: PracticeConfigPracticeConfigExample;
335
342
  [PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher;
336
343
  [PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner;
337
344
  [PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy;
345
+ [PracticeConfigKind.PracticeCssVariables]?: PracticeConfigPracticeCssVariables;
338
346
  }
339
347
  export interface Practice {
340
348
  uuid: string;
@@ -96,7 +96,25 @@ export declare enum MetadataCategory {
96
96
  Prescription = "Prescription",
97
97
  Raw = "Raw"
98
98
  }
99
- export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends EntryData {
99
+ /**
100
+ * This interface describes all images-alias question kind options
101
+ */
102
+ export interface ImagesAliasQuestionOptions {
103
+ /**
104
+ * Comma separated list of accepted formats. Will be given to the input html element.
105
+ * Use same format as described [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#accept)
106
+ */
107
+ accept?: string;
108
+ /**
109
+ * Should allow multiple uploads or not
110
+ */
111
+ multiple?: boolean;
112
+ /**
113
+ * Should display photo guide instructions or not
114
+ */
115
+ photoGuide?: boolean;
116
+ }
117
+ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = undefined> extends EntryData {
100
118
  kind: T;
101
119
  metaCategory: MetadataCategory;
102
120
  answers?: A;
@@ -104,13 +122,17 @@ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extend
104
122
  placeholder?: string;
105
123
  defaultValue?: any;
106
124
  value?: string;
125
+ /**
126
+ * Options to forward to the workflow component
127
+ */
128
+ options?: O;
107
129
  }
108
130
  export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {
109
131
  inline?: boolean;
110
132
  inlineLabel?: boolean;
111
133
  order?: number;
112
134
  }
113
- export declare type QuestionData = GenericQuestionData<'title' | 'paragraph' | 'checkbox', void> | GenericQuestionData<'text' | 'text-area' | 'date' | 'number' | 'images' | 'images-alias' | 'body-parts' | 'pharmacy-picker' | 'online-pharmacy-picker' | 'place-address'> | GenericQuestionData<'checkbox-group' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>> | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>> | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>> | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>;
135
+ export declare type QuestionData = GenericQuestionData<'title' | 'paragraph' | 'checkbox', void> | GenericQuestionData<'text' | 'text-area' | 'date' | 'number' | 'images' | 'body-parts' | 'pharmacy-picker' | 'online-pharmacy-picker' | 'place-address'> | GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions> | GenericQuestionData<'checkbox-group' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>> | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>> | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>> | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>;
114
136
  export interface FieldData {
115
137
  type: 'field';
116
138
  className?: string;
@@ -148,13 +170,27 @@ export interface WorkflowData {
148
170
  walkthroughSlides?: SlideData[];
149
171
  }
150
172
  /**
151
- * This interface describes a workflow prepared and ready to be sent to vault
173
+ * This interface describes an upload of an image (could be a picture, a pdf, a text file, etc.)
152
174
  */
153
175
  export interface WorkflowUploadedImage {
176
+ /**
177
+ * Depending on the driver used by WorkflowInput:
178
+ * - 'indexdb': will fetch the image in IndexDB with this id
179
+ * - 'vault': will fetch the image in the vault with this id
180
+ */
154
181
  idbId?: string;
182
+ /**
183
+ * The name of the image
184
+ */
155
185
  name: string;
186
+ /**
187
+ * the image data (could be a picture, a pdf, a text file, etc.)
188
+ */
156
189
  imageData?: string;
157
190
  }
191
+ /**
192
+ * This interface describes a workflow prepared and ready to be sent to vault
193
+ */
158
194
  export interface PopulatedWorkflowField {
159
195
  answer: SelectedAnswerData | WorkflowUploadedImage[];
160
196
  displayedAnswer?: any;
@@ -1333,6 +1333,14 @@ var ApisPracticeManager = /*#__PURE__*/function () {
1333
1333
  TaskStatus["Done"] = "Done";
1334
1334
  })(exports.TaskStatus || (exports.TaskStatus = {}));
1335
1335
 
1336
+ (function (ReasonWhyClosed) {
1337
+ ReasonWhyClosed["Completed"] = "Completed";
1338
+ ReasonWhyClosed["NotADisease"] = "NotADisease";
1339
+ ReasonWhyClosed["NotAppropriateForVirtual"] = "NotAppropriateForVirtual";
1340
+ ReasonWhyClosed["Other"] = "Other";
1341
+ ReasonWhyClosed["RequiresInPerson"] = "RequiresInPerson";
1342
+ })(exports.ReasonWhyClosed || (exports.ReasonWhyClosed = {}));
1343
+
1336
1344
  (function (VisibilityType) {
1337
1345
  VisibilityType["Generic"] = "Generic";
1338
1346
  VisibilityType["Private"] = "Private";
@@ -1528,10 +1536,11 @@ var IdentityCreationConflict = /*#__PURE__*/function (_Error7) {
1528
1536
  (function (PracticeConfigKind) {
1529
1537
  PracticeConfigKind["PractitionerConsultList"] = "PractitionerConsultList";
1530
1538
  PracticeConfigKind["PractitionerChatbox"] = "PractitionerChatbox";
1531
- PracticeConfigKind["PracticeTheme"] = "PracticeTheme";
1539
+ PracticeConfigKind["PracticeConfigExample"] = "PracticeConfigExample";
1532
1540
  PracticeConfigKind["PracticeLocaleSwitcher"] = "PracticeLocaleSwitcher";
1533
1541
  PracticeConfigKind["PracticeCookieBanner"] = "PracticeCookieBanner";
1534
1542
  PracticeConfigKind["PracticePharmacyPicker"] = "PracticePharmacyPicker";
1543
+ PracticeConfigKind["PracticeCssVariables"] = "PracticeCssVariables";
1535
1544
  })(exports.PracticeConfigKind || (exports.PracticeConfigKind = {}));
1536
1545
 
1537
1546
  (function (StripePriceType) {
@@ -1606,13 +1615,15 @@ var ConsultService = /*#__PURE__*/function () {
1606
1615
  */
1607
1616
  ;
1608
1617
 
1609
- _proto.countConsults = function countConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee) {
1618
+ _proto.countConsults = function countConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, reasonsWhyClosed, reasonsWhyOther, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee) {
1610
1619
  return this.api.head(this.baseURL + "/v1/consults", {
1611
1620
  params: {
1612
1621
  uuidPractice: uuidPractice,
1613
1622
  uuidRequester: uuidRequester,
1614
1623
  statusesMedical: statusesMedical,
1615
1624
  statusesExclude: statusesExclude,
1625
+ reasonsWhyClosed: reasonsWhyClosed,
1626
+ reasonsWhyOther: reasonsWhyOther,
1616
1627
  shortId: shortId,
1617
1628
  perPage: perPage,
1618
1629
  page: indexPage,
@@ -1653,13 +1664,15 @@ var ConsultService = /*#__PURE__*/function () {
1653
1664
  */
1654
1665
  ;
1655
1666
 
1656
- _proto.getConsults = function getConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee) {
1667
+ _proto.getConsults = function getConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, reasonsWhyClosed, reasonsWhyOther, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee) {
1657
1668
  return this.api.get(this.baseURL + "/v1/consults", {
1658
1669
  params: {
1659
1670
  uuidPractice: uuidPractice,
1660
1671
  uuidRequester: uuidRequester,
1661
1672
  statusesMedical: statusesMedical,
1662
1673
  statusesExclude: statusesExclude,
1674
+ reasonsWhyClosed: reasonsWhyClosed,
1675
+ reasonsWhyOther: reasonsWhyOther,
1663
1676
  shortId: shortId,
1664
1677
  perPage: perPage,
1665
1678
  page: indexPage,
@@ -2899,10 +2912,12 @@ var TellerService = /*#__PURE__*/function () {
2899
2912
  return lockboxDataStore;
2900
2913
  }();
2901
2914
 
2902
- _proto.updateConsultByUUID = function updateConsultByUUID(patientUuid, uuidConsult, statusMedical, neverExpires) {
2915
+ _proto.updateConsultByUUID = function updateConsultByUUID(patientUuid, uuidConsult, statusMedical, reasonWhyClosed, reasonWhyOther, neverExpires) {
2903
2916
  return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, {
2904
2917
  patientUuid: patientUuid,
2905
2918
  statusMedical: statusMedical,
2919
+ reasonWhyClosed: reasonWhyClosed,
2920
+ reasonWhyOther: reasonWhyOther,
2906
2921
  neverExpires: neverExpires
2907
2922
  });
2908
2923
  }