oro-sdk 2.1.4-dev1.0 → 2.2.1

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 (63) hide show
  1. package/README.md +26 -34
  2. package/dist/client.d.ts +4 -4
  3. package/dist/helpers/client.d.ts +1 -1
  4. package/dist/helpers/patient-registration.d.ts +1 -1
  5. package/dist/helpers/vault-grants.d.ts +1 -1
  6. package/dist/helpers/workflow.d.ts +1 -1
  7. package/dist/index.d.ts +15 -1
  8. package/dist/models/client.d.ts +1 -1
  9. package/dist/models/error.d.ts +0 -14
  10. package/dist/models/index.d.ts +0 -7
  11. package/dist/oro-sdk.cjs.development.js +313 -2367
  12. package/dist/oro-sdk.cjs.development.js.map +1 -1
  13. package/dist/oro-sdk.cjs.production.min.js +1 -1
  14. package/dist/oro-sdk.cjs.production.min.js.map +1 -1
  15. package/dist/oro-sdk.esm.js +246 -2344
  16. package/dist/oro-sdk.esm.js.map +1 -1
  17. package/dist/sdk-revision/client.d.ts +2 -2
  18. package/dist/services/index.d.ts +0 -9
  19. package/package.json +4 -1
  20. package/src/client.ts +161 -435
  21. package/src/helpers/client.ts +1 -1
  22. package/src/helpers/patient-registration.ts +85 -166
  23. package/src/helpers/vault-grants.ts +1 -1
  24. package/src/helpers/workflow.ts +21 -59
  25. package/src/index.ts +42 -28
  26. package/src/models/client.ts +1 -1
  27. package/src/models/error.ts +6 -13
  28. package/src/models/index.ts +0 -7
  29. package/src/sdk-revision/client.ts +25 -20
  30. package/src/services/external/clinia.ts +1 -1
  31. package/src/services/index.ts +0 -9
  32. package/dist/models/consult.d.ts +0 -102
  33. package/dist/models/diagnosis.d.ts +0 -122
  34. package/dist/models/guard.d.ts +0 -119
  35. package/dist/models/practice.d.ts +0 -353
  36. package/dist/models/shared.d.ts +0 -8
  37. package/dist/models/vault.d.ts +0 -124
  38. package/dist/models/workflow.d.ts +0 -106
  39. package/dist/services/api.d.ts +0 -11
  40. package/dist/services/axios.d.ts +0 -14
  41. package/dist/services/consult.d.ts +0 -54
  42. package/dist/services/diagnosis.d.ts +0 -44
  43. package/dist/services/guard.d.ts +0 -92
  44. package/dist/services/practice.d.ts +0 -100
  45. package/dist/services/teller.d.ts +0 -9
  46. package/dist/services/vault.d.ts +0 -54
  47. package/dist/services/workflow.d.ts +0 -21
  48. package/src/models/consult.ts +0 -110
  49. package/src/models/diagnosis.ts +0 -141
  50. package/src/models/guard.ts +0 -136
  51. package/src/models/practice.ts +0 -411
  52. package/src/models/shared.ts +0 -6
  53. package/src/models/vault.ts +0 -158
  54. package/src/models/workflow.ts +0 -142
  55. package/src/services/api.ts +0 -77
  56. package/src/services/axios.ts +0 -91
  57. package/src/services/consult.ts +0 -265
  58. package/src/services/diagnosis.ts +0 -144
  59. package/src/services/guard.ts +0 -228
  60. package/src/services/practice.ts +0 -537
  61. package/src/services/teller.ts +0 -39
  62. package/src/services/vault.ts +0 -178
  63. package/src/services/workflow.ts +0 -36
@@ -1,44 +0,0 @@
1
- import { Drug, TreatmentPlan, TreatmentPlans, TreatmentPlansRequest, TreatmentPlansResponse, Uuid } from '..';
2
- import { Diagnosis, Treatment, DiagnosisRequest, TreatmentRequest, TreatmentAndDrugPrescriptionUpdateRequest } from '../models/diagnosis';
3
- import { APIService } from './api';
4
- export declare class DiagnosisService {
5
- private api;
6
- private baseURL;
7
- constructor(api: APIService, baseURL: string);
8
- getDiagnoses(): Promise<Diagnosis[]>;
9
- /**
10
- * Get a diagnosis by uuid that belongs to your practice
11
- * @param uuidDiagnosis the uuid of the diagnosis
12
- * @returns a diagnosis
13
- */
14
- getDiagnosisByUuid(uuidDiagnosis: Uuid): Promise<Diagnosis>;
15
- createDiagnosis(diagnosis: DiagnosisRequest): Promise<Diagnosis>;
16
- updateDiagnosis(uuid: string, diagnosis: DiagnosisRequest): Promise<Diagnosis>;
17
- getTreatmentsFromDiagnosisUuid(diagnosisUuid: Uuid): Promise<Treatment[]>;
18
- /**
19
- * This function returns treatment plans associated to a consult
20
- * @param uuidConsult the consult uuid to fetch
21
- * @returns an array of TreatmentPlan
22
- */
23
- getTreatmentPlansFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlan[]>;
24
- /**
25
- * creates a new treatment for the diagnosis specified
26
- * @param diagnosisUuid uuid of the diagnosis that is linked to the treatment
27
- * @param treatmentRequest the treatment to be inserted
28
- */
29
- createTreatment(diagnosisUuid: string, treatmentRequest: TreatmentRequest): Promise<Treatment>;
30
- /**
31
- * This function returns populated treatment plans associated to a consult
32
- * @param uuidConsult the consult uuid to fetch
33
- * @returns a TreatmentPlans object
34
- */
35
- getTreatmentPlansPopulatedFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlans>;
36
- postPlans(plans: TreatmentPlansRequest): Promise<TreatmentPlansResponse>;
37
- updateTreatmentPlan(uuidPlan: string, uuidConsult: string, diagnosisRequest: DiagnosisRequest, plan: TreatmentAndDrugPrescriptionUpdateRequest): Promise<TreatmentPlan>;
38
- acceptTreatmentPlan(uuidPlan: string, uuidConsult: string): Promise<TreatmentPlan>;
39
- /**
40
- * retrieves all the drugs of the specified practice
41
- * @param uuidPractice
42
- */
43
- getAllDrugs(uuidPractice: string): Promise<Drug[] | undefined>;
44
- }
@@ -1,92 +0,0 @@
1
- import { APIService } from './api';
2
- import type { AxiosAuthRefreshRequestConfig } from 'axios-auth-refresh';
3
- import { AuthTokenRequest, AuthTokenResponse, AuthRecoverRequest, IdentityCreateRequest, IdentityUpdateRequest, IdentityResponse, QRCodeResponse, Uuid, WhoAmIResponse, Base64String, Tokens } from '../models';
4
- export interface GuardRequestConfig extends AxiosAuthRefreshRequestConfig {
5
- useRefreshToken: boolean;
6
- }
7
- export declare class GuardService {
8
- private api;
9
- private baseURL;
10
- private identityCache;
11
- private whoAmICache;
12
- constructor(api: APIService, baseURL: string);
13
- /**
14
- * Will replace access and refresh tokens with `tokens`
15
- *
16
- * Note:
17
- * ```typescript
18
- * setTokens({accessToken: undefined, refreshToken: 'aTokenValue'}) // will erase accessToken and set refreshToken with 'aTokenValue'
19
- * setTokens({refreshToken: 'aTokenValue'}) // will keep actual value of accessToken and set refreshToken with 'aTokenValue'
20
- *
21
- * ```
22
- * @param tokens
23
- */
24
- setTokens(tokens: Tokens): void;
25
- /**
26
- * Allow to retrieve an access token and a refresh token in order
27
- * to do authenticated request afterward
28
- *
29
- * @param req The credentials required to get an access token
30
- * @returns AuthTokenResponse
31
- */
32
- authToken(req: AuthTokenRequest): Promise<AuthTokenResponse>;
33
- /**
34
- * Get new access and refresh token
35
- *
36
- * @returns AuthTokenResponse
37
- */
38
- authRefresh(refreshToken?: string): Promise<AuthTokenResponse>;
39
- /**
40
- * Call guard to overwrite existing refresh token cookie
41
- *
42
- * @returns void
43
- */
44
- authLogout(): Promise<void>;
45
- /**
46
- * Call guard to attempt account recovery
47
- *
48
- * @param req The email address / practice of the account to recover
49
- * @returns void
50
- */
51
- authRecover(req: AuthRecoverRequest): Promise<void>;
52
- /**
53
- * Allow to create a new identity. The identity will then need to be confirmed
54
- * via an email link
55
- *
56
- * @param req the information about the new identity to create
57
- * @returns IdentityResponse
58
- */
59
- identityCreate(req: IdentityCreateRequest): Promise<IdentityResponse>;
60
- /**
61
- * Retrieve an identity. Will return public fields only when requested
62
- * without authentication
63
- *
64
- * @param identityID Unique id of the identity to retrieve
65
- * @returns IdentityResponse
66
- */
67
- identityGet(identityID: Uuid): Promise<IdentityResponse>;
68
- /**
69
- * Get information about the current authenticated user
70
- *
71
- * @param refreshCache if true it will refresh the whoAmI cache (default: false)
72
- * @returns WhoAmIResponse
73
- */
74
- whoAmI(refreshCache?: boolean): Promise<WhoAmIResponse>;
75
- /**
76
- * Update an existing identity
77
- *
78
- * @param identityID unique id of identity to update
79
- * @param req update request
80
- * @returns IdentityResponse
81
- */
82
- identityUpdate(identityID: Uuid, req: IdentityUpdateRequest): Promise<IdentityResponse>;
83
- /**
84
- * Return base64 data representing a QR code that the
85
- * current identity need in order to use MFA
86
- *
87
- * @param identityID unique id of the identity
88
- * @param password the identity password (already hashed and in base64)
89
- * @returns QRCodeResponse
90
- */
91
- identityMFAQRCode(identityID: Uuid, password: Base64String): Promise<QRCodeResponse>;
92
- }
@@ -1,100 +0,0 @@
1
- import * as OroToolbox from 'oro-toolbox';
2
- import { PracticeAccount, Uuid } from '../models';
3
- import { Assignment, PlanType, Practice, PracticeConfigs, PracticeConfigKind, PracticePayment, PracticePaymentIntent, PracticePlan, PracticePlanPrices, PracticeWorkflow, PracticeWorkflowWithTagSpecialty, Practitioner, PractitionerLicense, PractitionerPreference, PractitionerQuota, PractitionerRole, WorkflowType } from '../models/practice';
4
- import { APIService } from './api';
5
- export declare class PracticeService {
6
- private toolbox;
7
- private api;
8
- private baseURL;
9
- constructor(toolbox: typeof OroToolbox, api: APIService, baseURL: string);
10
- /**
11
- * This function get the practice from the URL of a practice
12
- * It is the entry point of our web apps
13
- * @param practiceURL URL of the practice to search
14
- * @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set
15
- * @param accounts (optional) if set true it the Practice field accounts will be set
16
- * @returns the found practice or undefined
17
- */
18
- practiceGetFromURL(practiceURL: string, params?: {
19
- hydratePracticeConfigs?: boolean;
20
- accounts?: boolean;
21
- }): Promise<Practice | undefined>;
22
- practiceGetFromUuid(practiceUuid: Uuid, locale?: string, withAccounts?: boolean): Promise<Practice>;
23
- /**
24
- * This function retrieves all configs of a specific practice
25
- * @param practiceUuid uuid of the practice
26
- * @returns the practice configs
27
- */
28
- practiceConfigGetFromPracticeUuid(practiceUuid: Uuid): Promise<PracticeConfigs[]>;
29
- /**
30
- * This function retrieves a specific config of a practice
31
- * @param practiceUuid uuid of the practice
32
- * @param kind of the config
33
- * @returns the practice config
34
- */
35
- practiceConfigGetByKindForPracticeUuid(practiceUuid: Uuid, kind: PracticeConfigKind): Promise<PracticeConfigs>;
36
- /**
37
- * This function creates a config for a specific practice
38
- * @param practiceUuid uuid of the practice
39
- * @param config the config to add to the practice
40
- * @returns the created practice config
41
- */
42
- practiceConfigCreateForPracticeUuid(practiceUuid: Uuid, config: PracticeConfigs): Promise<PracticeConfigs>;
43
- /**
44
- * This function updates a specific config of a practice
45
- * @param practiceUuid uuid of the practice
46
- * @param config the config to update
47
- * @returns the practice config
48
- */
49
- practiceConfigUpdate(config: PracticeConfigs): Promise<PracticeConfigs>;
50
- practiceGetAccounts(practiceUuid: Uuid): Promise<PracticeAccount[]>;
51
- practiceGetAccount(practiceUuid: Uuid, accountUuid: Uuid): Promise<PracticeAccount>;
52
- practiceGetWorkflows(practiceUuid: Uuid): Promise<PracticeWorkflow[]>;
53
- practiceGetWorkflow(practiceUuid: Uuid, workflowType: WorkflowType): Promise<PracticeWorkflowWithTagSpecialty>;
54
- practiceGetPlans(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePlan[]>;
55
- practiceGetPlan(practiceUuid: Uuid, planId: number): Promise<PracticePlan>;
56
- practiceGetPlanPrices(practiceUuid: Uuid, planId: number): Promise<PracticePlanPrices>;
57
- practiceGetPayments(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePayment[]>;
58
- practiceGetPayment(practiceUuid: Uuid, idStripeInvoiceOrPaymentIntent: string): Promise<PracticePayment>;
59
- practiceGetPaymentForStripePaymentIntentWithID(practiceUuid: Uuid, stripePaymentIntentId: number): Promise<PracticePayment>;
60
- practiceGetPaymentsIntents(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePaymentIntent[]>;
61
- /**
62
- * This function return the user hased email to be use for creating payment intent
63
- * @param email the email to hash
64
- * @returns a hashed email
65
- */
66
- getPaymentIntentHashedEmail(email: string): string;
67
- practiceCreatePaymentsIntent(practiceUuid: Uuid, planId: number, userEmail: string, isoLocality?: string, url_subdomain?: string, promotionCode?: string): Promise<PracticePaymentIntent>;
68
- practiceGetPaymentsIntent(practiceUuid: Uuid, paymentIntentId: number): Promise<PracticePaymentIntent>;
69
- practiceUpdatePaymentsIntent(practiceUuid: string, idPraticePaymentIntent: number, practicePaymentIntent: PracticePaymentIntent, userEmail: string, promotionCode?: string): Promise<PracticePaymentIntent>;
70
- practiceGetPractitioners(practiceUuid: Uuid): Promise<Practitioner[]>;
71
- practiceUpdatePractitioner(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: Practitioner): Promise<Practitioner>;
72
- practiceGetPractitioner(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Practitioner>;
73
- practiceGetPractitionerLicenses(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerLicense[]>;
74
- practiceCreatePractitionerLicense(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: PractitionerLicense): Promise<PractitionerLicense>;
75
- practiceUpdatePractitionerLicense(practiceUuid: Uuid, practitionerUuid: Uuid, licenseId: number, requestBody: PractitionerLicense): Promise<PractitionerLicense>;
76
- practiceGetPractitionerLicense(practiceUuid: Uuid, practitionerUuid: Uuid, licenseId: number): Promise<PractitionerLicense>;
77
- practiceGetPractitionerPreferences(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerPreference[]>;
78
- practiceCreatePractitionerPreference(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: PractitionerPreference): Promise<PractitionerPreference>;
79
- practiceUpdatePractitionerPreference(practiceUuid: Uuid, practitionerUuid: Uuid, preferenceId: number, requestBody: PractitionerPreference): Promise<PractitionerPreference>;
80
- practiceGetPractitionerPreference(practiceUuid: Uuid, practitionerUuid: Uuid, preferenceId: number): Promise<PractitionerPreference>;
81
- practiceGetPractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerRole[]>;
82
- practiceCreatePractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: PractitionerRole): Promise<PractitionerRole>;
83
- practiceDeletePractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerRole>;
84
- practiceUpdatePractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, roleId: number, requestBody: PractitionerRole): Promise<PractitionerRole>;
85
- practiceGetPractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, roleId: number): Promise<PractitionerRole>;
86
- practiceDeletePractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, roleId: number): Promise<PractitionerRole>;
87
- /**
88
- * This function returns the practitioner's signature as a Blob
89
- * @param practiceUuid the practice uuid of the practitioner
90
- * @param practitionerUuid the practitioner uuid
91
- * @returns a blob representing the signature
92
- */
93
- practiceGetPractitionerSignature(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Blob>;
94
- practiceGetAssignments(practiceUuid: Uuid): Promise<Assignment[]>;
95
- practiceCreateAssignment(practiceUuid: Uuid, requestBody: Assignment): Promise<Assignment>;
96
- practiceUpdateAssignment(practiceUuid: Uuid, assignmentId: number, requestBody: Assignment): Promise<Assignment>;
97
- practiceGetAssignment(practiceUuid: Uuid, assignmentId: number): Promise<Assignment>;
98
- practiceGetQuotas(practiceUuid: Uuid): Promise<PractitionerQuota[]>;
99
- practiceGetQuota(practiceUuid: Uuid, quotaId: number): Promise<PractitionerQuota>;
100
- }
@@ -1,9 +0,0 @@
1
- import { APIService } from './api';
2
- import { Consult, DataCreateResponse, LockboxDataRequest, MedicalStatus, Uuid } from '../models';
3
- export declare class TellerService {
4
- private api;
5
- private baseURL;
6
- constructor(api: APIService, baseURL: string);
7
- lockboxDataStore(lockboxUuid: Uuid, req: LockboxDataRequest, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
8
- updateConsultByUUID(patientUuid: Uuid, uuidConsult: Uuid, statusMedical: MedicalStatus, neverExpires?: boolean): Promise<Consult>;
9
- }
@@ -1,54 +0,0 @@
1
- import { APIService } from './api';
2
- import { DataCreateResponse, DataResponse, GrantedLockboxes, LockboxCreateResponse, LockboxDataRequest, LockboxGrantRequest, LockboxManifest, SharedSecretResponse, Uuid, EncryptedVaultIndex, IndexKey, EncryptedIndexEntry } from '../models';
3
- export declare class VaultService {
4
- private api;
5
- private baseURL;
6
- constructor(api: APIService, baseURL: string);
7
- lockboxCreate(lockboxMetadata?: Object): Promise<LockboxCreateResponse>;
8
- lockboxMetadataAdd(lockboxUuid: Uuid, lockboxMetadata: Object, lockboxOwnerUuid?: Uuid): Promise<LockboxCreateResponse>;
9
- lockboxSecretGet(lockboxUuid: Uuid, lockboxOwnerUuid?: Uuid): Promise<SharedSecretResponse>;
10
- lockboxGrant(lockboxUuid: Uuid, req: LockboxGrantRequest, lockboxOwnerUuid?: Uuid): Promise<void>;
11
- /**
12
- * Get all lockboxes granted to user
13
- * @param filter filter of lockbox metadata
14
- * @returns decrypted lockboxes granted to user
15
- */
16
- grantsGet(): Promise<GrantedLockboxes>;
17
- /**
18
- * This function create or update a data into the vault.
19
- * @note At creation it is necessary to have all `req` filled
20
- * @note When setting `previousDataUuid` you are updating the data. `req` metadata fields are optional.
21
- * @param lockboxUuid The lockbox uuid the data will be stored in
22
- * @param req The request (please see notes)
23
- * @param lockboxOwnerUuid The uuid of the owner of the lockbox (@deprecated)
24
- * @param previousDataUuid The data uuid of the data you want to update
25
- * @returns
26
- */
27
- lockboxDataStore(lockboxUuid: Uuid, req: LockboxDataRequest, lockboxOwnerUuid?: Uuid, previousDataUuid?: Uuid): Promise<DataCreateResponse>;
28
- lockboxDataGet(lockboxUuid: Uuid, dataUuid: Uuid, lockboxOwnerUuid?: Uuid, stream?: boolean): Promise<DataResponse>;
29
- lockboxManifestGet(lockboxUuid: Uuid, filter?: Object, lockboxOwnerUuid?: Uuid): Promise<LockboxManifest>;
30
- lockboxMetadataGet(lockboxUuid: Uuid, fields: string[], groupby: string[], filter?: Object, lockboxOwnerUuid?: Uuid): Promise<any[]>;
31
- /**
32
- * inserts or updates encrypted index entries
33
- * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid`
34
- * @note if a uuid for an entry is provided, the service will perform an update
35
- * @param entries the encrypted index data
36
- * @param indexOwnerUuid
37
- */
38
- vaultIndexPut(entries: EncryptedVaultIndex, indexOwnerUuid?: Uuid): Promise<void>;
39
- /**
40
- * inserts or updates index snapshot for the provided index owner
41
- * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid`
42
- * @param entry the encrypted index snapshot
43
- */
44
- vaultIndexSnapshotPut(entry: EncryptedIndexEntry): Promise<void>;
45
- /**
46
- * Retrieves the encrypted index from the vault for the requesting user
47
- * @note index keys can be specified to narrow the scope of index being requested
48
- * @param indexKeys accepted index fields determined by vault
49
- * @param identifiers: an array of unique_hashes or consultation uuids used to identify an index entry
50
- * @param timestamp the minimum timestamp that index entries were created
51
- * @returns the encrypted index
52
- */
53
- vaultIndexGet(indexKeys: IndexKey[], identifiers?: string[], timestamp?: Date): Promise<EncryptedVaultIndex>;
54
- }
@@ -1,21 +0,0 @@
1
- import { WorkflowData } from '../models/workflow';
2
- import { APIService } from './api';
3
- export declare class WorkflowService {
4
- private api;
5
- private v1Url;
6
- constructor(api: APIService, url: string);
7
- /**
8
- * This function returns all workflows
9
- * @returns desired workflow
10
- */
11
- getWorkflows(): Promise<WorkflowData[]>;
12
- /**
13
- * This function retrieves a workflow. If `locale` is not found, it will try to find 'en' version of it.
14
- * By default, will return most recent workflow of a specific `id`. `createdAt` can be used to select older version.
15
- * @param id The uuid of the workflow
16
- * @param locale (optional) The desired locale of the workflow (default: 'en')
17
- * @param createdAt (optional) The creation date of the workflow (also used for versionning)
18
- * @returns desired workflow
19
- */
20
- getWorkflow(id: string, locale?: string, createdAt?: string): Promise<WorkflowData>;
21
- }
@@ -1,110 +0,0 @@
1
- export enum AssistantType {
2
- MedicalSecretary = 'MedicalSecretary',
3
- Nurse = 'Nurse',
4
- Specialist = 'Specialist',
5
- Administrative = 'Administrative',
6
- Other = 'Other',
7
- }
8
-
9
- export interface ConsultAssignedAssistant {
10
- id?: number ///optional for insertion
11
- uuidConsult: string
12
- uuidAssistant: string
13
- type: AssistantType
14
- tagSpecialty?: string
15
- duuidCurrentTaskDescription?: string
16
- }
17
-
18
- export enum TransmissionKind {
19
- Fax = 'Fax',
20
- Email = 'Email',
21
- SMS = 'SMS',
22
- EncryptedEmail = 'EncryptedEmail',
23
- Logs = 'Logs',
24
- API = 'API',
25
- Other = 'Other',
26
- }
27
-
28
- export enum TransmissionStatus {
29
- Preparing = 'Preparing',
30
- Sending = 'Sending',
31
- Sent = 'Sent',
32
- Retrying = 'Retrying',
33
- Failed = 'Failed',
34
- DriverError = 'DriverError',
35
- TimedOut = 'TimedOut',
36
- ReceiverNotExist = 'ReceiverNotExist',
37
- ReceiverNotAnswering = 'ReceiverNotAnswering',
38
- ReceiverIncompatible = 'ReceiverIncompatible',
39
- }
40
-
41
- export interface ConsultTransmission {
42
- id: number
43
- uuidConsult: string
44
- kind: TransmissionKind
45
- status: TransmissionStatus
46
- nameDriverReceiver: string
47
- addressReceiver: string
48
- idDriverForTransmission: string
49
- txtLastDriverMessage: string
50
- numTry: number
51
- numTryLeft: number
52
- delay: number
53
- tsFirstTry: string
54
- tsLastStatusUpdate: string
55
- keyWebhookSecret: string
56
- }
57
-
58
- export enum FeeStatus {
59
- NoFee = 'NoFee',
60
- Pending = 'Pending',
61
- Paid = 'Paid',
62
- Reimbursed = 'Reimbursed',
63
- Cancelled = 'Cancelled',
64
- Contested = 'Contested',
65
- }
66
-
67
- export enum MedicalStatus {
68
- Creating = 'Creating',
69
- New = 'New',
70
- ToAnswer = 'ToAnswer',
71
- Answered = 'Answered',
72
- Closed = 'Closed',
73
- Reopened = 'Reopened',
74
- Archived = 'Archived',
75
- }
76
-
77
- export enum TaskStatus {
78
- None = 'None',
79
- ToDo = 'ToDo',
80
- InProgress = 'InProgress',
81
- Blocked = 'Blocked',
82
- Done = 'Done',
83
- }
84
-
85
- export interface ConsultRequest {
86
- uuidPractice: string
87
- tagSpecialtyRequired: string
88
- idStripeInvoiceOrPaymentIntent: string
89
- isoLocalityRequired?: string
90
- isoLanguageRequired: string
91
- }
92
- export interface Consult {
93
- uuid: string
94
- uuidPracticeAdmin: string
95
- uuidPractice: string
96
- tagSpecialtyRequired: string
97
- isoLanguageRequired: string
98
- idPracticePayment: number
99
- statusFee?: FeeStatus
100
- isoLocalityRequired: string
101
- statusMedical?: MedicalStatus
102
- uuidAssignedDoctor: string
103
- uuidCurrentAssigned: string
104
- statusTask?: TaskStatus
105
- hasTransmissions?: boolean
106
- assignedAssistant?: ConsultAssignedAssistant[]
107
- shortId?: string
108
- createdAt?: string
109
- expiresAt?: string
110
- }
@@ -1,141 +0,0 @@
1
- export enum DiagnosisType {
2
- Generic = 'Generic',
3
- Private = 'Private',
4
- Instance = 'Instance',
5
- }
6
-
7
- export interface DiagnosisRequest {
8
- uuid?: string
9
- name: string
10
- description: string
11
- type: DiagnosisType
12
- parentUuid?: string
13
- language: string
14
- tags?: string[]
15
- urlMultimedia?: string
16
- }
17
-
18
- export interface Diagnosis extends DiagnosisRequest {
19
- uuid: string
20
- uuidPractice: string
21
- uuidPractitioner?: string
22
- createdAt: string
23
- }
24
-
25
- export interface TreatmentRequest {
26
- uuid?: string
27
- uuidDiagnosis?: string
28
- name: string
29
- description: string
30
- urlMultimedia?: string
31
- }
32
-
33
- export interface Treatment extends TreatmentRequest {
34
- uuid: string
35
- uuidDiagnosis: string
36
- createdAt: string
37
- }
38
-
39
- export enum DrugType {
40
- Generic = 'Generic',
41
- Instance = 'Instance',
42
- }
43
-
44
- export interface DrugRequest {
45
- name: string // name of the drug
46
- description: string // Description of the drug
47
- type: DrugType // Entry type
48
- language: string // drug locale
49
- sideEffects: string // Side effects of the drug
50
- imageUrl?: string // Image URL to the drug
51
- parentUuid?: string // (optional) parent uuid of the drug. In case of DrugType.Instance
52
- uuid?: string // uuid of the drug (will be used as parentUuid in case of creation of new drug)
53
- }
54
-
55
- export interface Drug extends DrugRequest {
56
- uuid: string
57
- uuidPractice: string
58
- uuidPractitioner?: string
59
- createdAt: string
60
- }
61
-
62
- export interface PrescriptionRequest {
63
- uuid?: string
64
- uuidTreatment?: string
65
- uuidDrug?: string
66
- quantity: string
67
- sig: string
68
- renewal: string
69
- }
70
-
71
- export interface Prescription extends PrescriptionRequest {
72
- uuid: string
73
- uuidTreatment: string
74
- createdAt: string
75
- }
76
-
77
- export enum PlanStatus {
78
- Pending = 'Pending',
79
- Accepted = 'Accepted',
80
- Rejected = 'Rejected',
81
- }
82
-
83
- export interface TreatmentPlan {
84
- uuid: string
85
- uuidConsult: string
86
- uuidDiagnosis: string
87
- uuidTreatment?: string
88
- status: PlanStatus
89
- }
90
-
91
- export interface DrugPrescription {
92
- prescription: Prescription
93
- drug: Drug
94
- }
95
-
96
- export interface TreatmentAndDrugPrescription {
97
- treatment?: Treatment
98
- prescriptionsAndDrugs?: DrugPrescription[]
99
- status: PlanStatus
100
- uuidTreatmentPlan: string
101
- }
102
- export interface TreatmentPlans {
103
- uuidConsult: string
104
- diagnosis: Diagnosis
105
- plans?: TreatmentAndDrugPrescription[]
106
- }
107
-
108
- export interface DrugPrescriptionRequest {
109
- prescription: PrescriptionRequest
110
- drug: DrugRequest
111
- }
112
-
113
- export interface TreatmentAndDrugPrescriptionRequest {
114
- trackingId: string
115
- treatment: TreatmentRequest
116
- prescriptionsAndDrugs?: DrugPrescriptionRequest[]
117
- }
118
-
119
- export interface TreatmentPlansRequest {
120
- uuidConsult: string
121
- diagnosis: DiagnosisRequest
122
- plans?: TreatmentAndDrugPrescriptionRequest[]
123
- }
124
-
125
- export interface TreatmentAndDrugPrescriptionUpdateRequest {
126
- treatment: Treatment
127
- prescriptionsAndDrugs?: DrugPrescriptionRequest[]
128
- }
129
-
130
- export interface TreatmentPlanUpdateRequest extends TreatmentPlansRequest {
131
- uuidConsult: string
132
- diagnosis: DiagnosisRequest
133
- plan: TreatmentAndDrugPrescriptionUpdateRequest
134
- }
135
-
136
- export interface TreatmentPlansResponseEntry {
137
- trackingId?: string // can be undefined if treatmentPlan does not contain a treatment
138
- treatmentPlan: TreatmentPlan
139
- }
140
-
141
- export interface TreatmentPlansResponse extends Array<TreatmentPlansResponseEntry> {}