@oystehr/sdk 3.0.9 → 3.0.10
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/dist/cjs/config.d.ts +1 -0
- package/dist/cjs/index.cjs +74 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/cjs/index.min.cjs.map +1 -1
- package/dist/cjs/resources/classes/index.d.ts +2 -0
- package/dist/cjs/resources/classes/lab.d.ts +63 -0
- package/dist/cjs/resources/types/LabOrderSubmitParams.d.ts +11 -0
- package/dist/cjs/resources/types/LabOrderableItemListParams.d.ts +11 -0
- package/dist/cjs/resources/types/LabOrderableItemListResponse.d.ts +134 -0
- package/dist/cjs/resources/types/LabOrderableItemQuestionnaireGetParams.d.ts +6 -0
- package/dist/cjs/resources/types/LabOrderableItemQuestionnaireGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/LabRouteCreateParams.d.ts +41 -0
- package/dist/cjs/resources/types/LabRouteDeleteParams.d.ts +4 -0
- package/dist/cjs/resources/types/LabRouteListResponse.d.ts +17 -0
- package/dist/cjs/resources/types/index.d.ts +8 -0
- package/dist/esm/config.d.ts +1 -0
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/resources/classes/index.d.ts +2 -0
- package/dist/esm/resources/classes/index.js +2 -0
- package/dist/esm/resources/classes/index.js.map +1 -1
- package/dist/esm/resources/classes/lab.d.ts +63 -0
- package/dist/esm/resources/classes/lab.js +78 -0
- package/dist/esm/resources/classes/lab.js.map +1 -0
- package/dist/esm/resources/types/LabOrderSubmitParams.d.ts +11 -0
- package/dist/esm/resources/types/LabOrderableItemListParams.d.ts +11 -0
- package/dist/esm/resources/types/LabOrderableItemListResponse.d.ts +134 -0
- package/dist/esm/resources/types/LabOrderableItemQuestionnaireGetParams.d.ts +6 -0
- package/dist/esm/resources/types/LabOrderableItemQuestionnaireGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/LabRouteCreateParams.d.ts +41 -0
- package/dist/esm/resources/types/LabRouteDeleteParams.d.ts +4 -0
- package/dist/esm/resources/types/LabRouteListResponse.d.ts +17 -0
- package/dist/esm/resources/types/index.d.ts +8 -0
- package/package.json +2 -2
- package/src/config.ts +1 -0
- package/src/resources/classes/index.ts +3 -0
- package/src/resources/classes/lab.ts +113 -0
- package/src/resources/types/LabOrderSubmitParams.ts +13 -0
- package/src/resources/types/LabOrderableItemListParams.ts +13 -0
- package/src/resources/types/LabOrderableItemListResponse.ts +136 -0
- package/src/resources/types/LabOrderableItemQuestionnaireGetParams.ts +8 -0
- package/src/resources/types/LabOrderableItemQuestionnaireGetResponse.ts +7 -0
- package/src/resources/types/LabRouteCreateParams.ts +43 -0
- package/src/resources/types/LabRouteDeleteParams.ts +6 -0
- package/src/resources/types/LabRouteListResponse.ts +19 -0
- package/src/resources/types/index.ts +8 -0
|
@@ -6,6 +6,7 @@ import { Developer } from './developer';
|
|
|
6
6
|
import { Erx } from './erx';
|
|
7
7
|
import { Fax } from './fax';
|
|
8
8
|
import { Fhir } from './fhir';
|
|
9
|
+
import { Lab } from './lab';
|
|
9
10
|
import { M2m } from './m2m';
|
|
10
11
|
import { Messaging } from './messaging';
|
|
11
12
|
import { PaymentMethod } from './paymentMethod';
|
|
@@ -42,6 +43,7 @@ export declare class Oystehr {
|
|
|
42
43
|
readonly zambda: Zambda;
|
|
43
44
|
readonly zambdaLogStream: ZambdaLogStream;
|
|
44
45
|
readonly fax: Fax;
|
|
46
|
+
readonly lab: Lab;
|
|
45
47
|
readonly fhir: Fhir;
|
|
46
48
|
constructor(config: OystehrConfig);
|
|
47
49
|
}
|
|
@@ -5,6 +5,7 @@ import { Developer } from './developer.js';
|
|
|
5
5
|
import { Erx } from './erx.js';
|
|
6
6
|
import { Fax } from './fax.js';
|
|
7
7
|
import { Fhir } from './fhir.js';
|
|
8
|
+
import { Lab } from './lab.js';
|
|
8
9
|
import { M2m } from './m2m.js';
|
|
9
10
|
import { Messaging } from './messaging.js';
|
|
10
11
|
import { PaymentMethod } from './paymentMethod.js';
|
|
@@ -49,6 +50,7 @@ let Oystehr$1 = class Oystehr {
|
|
|
49
50
|
this.zambda = new Zambda(config);
|
|
50
51
|
this.zambdaLogStream = new ZambdaLogStream(config);
|
|
51
52
|
this.fax = new Fax(config);
|
|
53
|
+
this.lab = new Lab(config);
|
|
52
54
|
this.fhir = new Fhir(config);
|
|
53
55
|
}
|
|
54
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/resources/classes/index.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrConfig } from '../../config';\nimport { Application } from './application';\nimport { Charge } from './charge';\nimport { Conversation } from './conversation';\nimport { Developer } from './developer';\nimport { Erx } from './erx';\nimport { Fax } from './fax';\nimport { Fhir } from './fhir';\nimport { M2m } from './m2m';\nimport { Messaging } from './messaging';\nimport { PaymentMethod } from './paymentMethod';\nimport { Project } from './project';\nimport { Rcm } from './rcm';\nimport { Role } from './role';\nimport { Secret } from './secret';\nimport { Telemed } from './telemed';\nimport { TransactionalSMS } from './transactionalSMS';\nimport { User } from './user';\nimport { Version } from './version';\nimport { Z3 } from './z3';\nimport { Zambda } from './zambda';\nimport { ZambdaLogStream } from './zambdaLogStream';\n\nexport class Oystehr {\n readonly config: OystehrConfig;\n readonly application: Application;\n readonly developer: Developer;\n readonly m2m: M2m;\n readonly messaging: Messaging;\n readonly conversation: Conversation;\n readonly transactionalSMS: TransactionalSMS;\n readonly paymentMethod: PaymentMethod;\n readonly charge: Charge;\n readonly project: Project;\n readonly rcm: Rcm;\n readonly erx: Erx;\n readonly role: Role;\n readonly secret: Secret;\n readonly telemed: Telemed;\n readonly user: User;\n readonly version: Version;\n readonly z3: Z3;\n readonly zambda: Zambda;\n readonly zambdaLogStream: ZambdaLogStream;\n readonly fax: Fax;\n readonly fhir: Fhir;\n constructor(config: OystehrConfig) {\n this.config = config;\n this.config.services ??= {};\n this.config.services['projectApiUrl'] ??= config.projectApiUrl;\n this.config.services['fhirApiUrl'] ??= config.fhirApiUrl;\n this.application = new Application(config);\n this.developer = new Developer(config);\n this.m2m = new M2m(config);\n this.messaging = new Messaging(config);\n this.conversation = new Conversation(config);\n this.transactionalSMS = new TransactionalSMS(config);\n this.paymentMethod = new PaymentMethod(config);\n this.charge = new Charge(config);\n this.project = new Project(config);\n this.rcm = new Rcm(config);\n this.erx = new Erx(config);\n this.role = new Role(config);\n this.secret = new Secret(config);\n this.telemed = new Telemed(config);\n this.user = new User(config);\n this.version = new Version(config);\n this.z3 = new Z3(config);\n this.zambda = new Zambda(config);\n this.zambdaLogStream = new ZambdaLogStream(config);\n this.fax = new Fax(config);\n this.fhir = new Fhir(config);\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/resources/classes/index.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrConfig } from '../../config';\nimport { Application } from './application';\nimport { Charge } from './charge';\nimport { Conversation } from './conversation';\nimport { Developer } from './developer';\nimport { Erx } from './erx';\nimport { Fax } from './fax';\nimport { Fhir } from './fhir';\nimport { Lab } from './lab';\nimport { M2m } from './m2m';\nimport { Messaging } from './messaging';\nimport { PaymentMethod } from './paymentMethod';\nimport { Project } from './project';\nimport { Rcm } from './rcm';\nimport { Role } from './role';\nimport { Secret } from './secret';\nimport { Telemed } from './telemed';\nimport { TransactionalSMS } from './transactionalSMS';\nimport { User } from './user';\nimport { Version } from './version';\nimport { Z3 } from './z3';\nimport { Zambda } from './zambda';\nimport { ZambdaLogStream } from './zambdaLogStream';\n\nexport class Oystehr {\n readonly config: OystehrConfig;\n readonly application: Application;\n readonly developer: Developer;\n readonly m2m: M2m;\n readonly messaging: Messaging;\n readonly conversation: Conversation;\n readonly transactionalSMS: TransactionalSMS;\n readonly paymentMethod: PaymentMethod;\n readonly charge: Charge;\n readonly project: Project;\n readonly rcm: Rcm;\n readonly erx: Erx;\n readonly role: Role;\n readonly secret: Secret;\n readonly telemed: Telemed;\n readonly user: User;\n readonly version: Version;\n readonly z3: Z3;\n readonly zambda: Zambda;\n readonly zambdaLogStream: ZambdaLogStream;\n readonly fax: Fax;\n readonly lab: Lab;\n readonly fhir: Fhir;\n constructor(config: OystehrConfig) {\n this.config = config;\n this.config.services ??= {};\n this.config.services['projectApiUrl'] ??= config.projectApiUrl;\n this.config.services['fhirApiUrl'] ??= config.fhirApiUrl;\n this.application = new Application(config);\n this.developer = new Developer(config);\n this.m2m = new M2m(config);\n this.messaging = new Messaging(config);\n this.conversation = new Conversation(config);\n this.transactionalSMS = new TransactionalSMS(config);\n this.paymentMethod = new PaymentMethod(config);\n this.charge = new Charge(config);\n this.project = new Project(config);\n this.rcm = new Rcm(config);\n this.erx = new Erx(config);\n this.role = new Role(config);\n this.secret = new Secret(config);\n this.telemed = new Telemed(config);\n this.user = new User(config);\n this.version = new Version(config);\n this.z3 = new Z3(config);\n this.zambda = new Zambda(config);\n this.zambdaLogStream = new ZambdaLogStream(config);\n this.fax = new Fax(config);\n this.lab = new Lab(config);\n this.fhir = new Fhir(config);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;sBA0Ba,OAAO,CAAA;AAwBlB,IAAA,WAAA,CAAY,MAAqB,EAAA;;;AAC/B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,EAAC,QAAQ,MAAR,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,IAAA,EAAA,CAAA,QAAQ,GAAK,EAAE,CAAC,CAAA;AAC5B,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAC,eAAe,CAAA,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,IAAA,EAAA,CAAf,eAAe,CAAA,GAAM,MAAM,CAAC,aAAa,CAAC,CAAA;AAC/D,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAC,YAAY,CAAA,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,IAAA,EAAA,CAAZ,YAAY,CAAA,GAAM,MAAM,CAAC,UAAU,CAAC,CAAA;QACzD,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;KAC9B;AACF;;;;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { LabOrderableItemListParams, LabOrderableItemListResponse, LabOrderableItemQuestionnaireGetParams, LabOrderableItemQuestionnaireGetResponse, LabOrderSubmitParams, LabRouteCreateParams, LabRouteDeleteParams, LabRouteListResponse, OystehrClientRequest } from '../..';
|
|
2
|
+
import { SDKResource } from '../../client/client';
|
|
3
|
+
import { OystehrConfig } from '../../config';
|
|
4
|
+
export declare class Lab extends SDKResource {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(config: OystehrConfig);
|
|
7
|
+
/**
|
|
8
|
+
* Gets a list of Routes associated with the project. Returns an empty list if no Routes are found.
|
|
9
|
+
*
|
|
10
|
+
* Access Policy Requirements:
|
|
11
|
+
* Action: `Lab:GetRoutes`
|
|
12
|
+
* Access Policy Resource: `Lab:Route`
|
|
13
|
+
*/
|
|
14
|
+
routeList(request?: OystehrClientRequest): Promise<LabRouteListResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a route. A Route represents that a lab and particular customer have a relationship, and a Route is necessary to submit an order to a lab. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
17
|
+
*
|
|
18
|
+
* Access Policy Requirements:
|
|
19
|
+
* Action: `Lab:CreateRoute`
|
|
20
|
+
* Access Policy Resource: `Lab:Route`
|
|
21
|
+
*/
|
|
22
|
+
routeCreate(params: LabRouteCreateParams, request?: OystehrClientRequest): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.
|
|
25
|
+
*
|
|
26
|
+
* Access Policy Requirements:
|
|
27
|
+
* Action: `Lab:DeleteRoute`
|
|
28
|
+
* Access Policy Resource: `Lab:Route`
|
|
29
|
+
*/
|
|
30
|
+
routeDelete(params: LabRouteDeleteParams, request?: OystehrClientRequest): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.
|
|
33
|
+
*
|
|
34
|
+
* Access Policy Requirements:
|
|
35
|
+
* Action: `Lab:SearchOrderableItems`
|
|
36
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
37
|
+
*/
|
|
38
|
+
orderableItemList(params: LabOrderableItemListParams, request?: OystehrClientRequest): Promise<LabOrderableItemListResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.
|
|
41
|
+
*
|
|
42
|
+
* Access Policy Requirements:
|
|
43
|
+
* Action: `Lab:SearchOrderableItems`
|
|
44
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
45
|
+
*/
|
|
46
|
+
orderableItemList(request?: OystehrClientRequest): Promise<LabOrderableItemListResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieve the AOE (Answer on Entry) Questionnaire for the given orderable item. The orderable item is defined by its labGuid, compendiumVersion, and itemCode. See [AOE](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#AOE) for more details.
|
|
49
|
+
*
|
|
50
|
+
* Access Policy Requirements:
|
|
51
|
+
* Action: `Lab:SearchOrderableItems`
|
|
52
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
53
|
+
*/
|
|
54
|
+
orderableItemQuestionnaireGet(params: LabOrderableItemQuestionnaireGetParams, request?: OystehrClientRequest): Promise<LabOrderableItemQuestionnaireGetResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit a well configured ServiceRequest to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist.
|
|
57
|
+
*
|
|
58
|
+
* Access Policy Requirements:
|
|
59
|
+
* Action: `Lab:SubmitOrder`
|
|
60
|
+
* Access Policy Resource: `Lab:Order`
|
|
61
|
+
*/
|
|
62
|
+
orderSubmit(params: LabOrderSubmitParams, request?: OystehrClientRequest): Promise<void>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { SDKResource } from '../../client/client.js';
|
|
3
|
+
|
|
4
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
5
|
+
var _Lab_instances, _Lab_baseUrlThunk;
|
|
6
|
+
class Lab extends SDKResource {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
_Lab_instances.add(this);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Gets a list of Routes associated with the project. Returns an empty list if no Routes are found.
|
|
13
|
+
*
|
|
14
|
+
* Access Policy Requirements:
|
|
15
|
+
* Action: `Lab:GetRoutes`
|
|
16
|
+
* Access Policy Resource: `Lab:Route`
|
|
17
|
+
*/
|
|
18
|
+
routeList(request) {
|
|
19
|
+
return this.request('/route', 'get', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(request);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a route. A Route represents that a lab and particular customer have a relationship, and a Route is necessary to submit an order to a lab. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
23
|
+
*
|
|
24
|
+
* Access Policy Requirements:
|
|
25
|
+
* Action: `Lab:CreateRoute`
|
|
26
|
+
* Access Policy Resource: `Lab:Route`
|
|
27
|
+
*/
|
|
28
|
+
routeCreate(params, request) {
|
|
29
|
+
return this.request('/route', 'post', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.
|
|
33
|
+
*
|
|
34
|
+
* Access Policy Requirements:
|
|
35
|
+
* Action: `Lab:DeleteRoute`
|
|
36
|
+
* Access Policy Resource: `Lab:Route`
|
|
37
|
+
*/
|
|
38
|
+
routeDelete(params, request) {
|
|
39
|
+
return this.request('/route/{routeGuid}', 'delete', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.
|
|
43
|
+
*
|
|
44
|
+
* Access Policy Requirements:
|
|
45
|
+
* Action: `Lab:SearchOrderableItems`
|
|
46
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
47
|
+
*/
|
|
48
|
+
orderableItemList(params, request) {
|
|
49
|
+
return this.request('/orderableItem', 'get', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Retrieve the AOE (Answer on Entry) Questionnaire for the given orderable item. The orderable item is defined by its labGuid, compendiumVersion, and itemCode. See [AOE](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#AOE) for more details.
|
|
53
|
+
*
|
|
54
|
+
* Access Policy Requirements:
|
|
55
|
+
* Action: `Lab:SearchOrderableItems`
|
|
56
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
57
|
+
*/
|
|
58
|
+
orderableItemQuestionnaireGet(params, request) {
|
|
59
|
+
return this.request('/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire', 'get', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit a well configured ServiceRequest to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist.
|
|
63
|
+
*
|
|
64
|
+
* Access Policy Requirements:
|
|
65
|
+
* Action: `Lab:SubmitOrder`
|
|
66
|
+
* Access Policy Resource: `Lab:Order`
|
|
67
|
+
*/
|
|
68
|
+
orderSubmit(params, request) {
|
|
69
|
+
return this.request('/submit', 'post', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
_Lab_instances = new WeakSet(), _Lab_baseUrlThunk = function _Lab_baseUrlThunk() {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['labApiUrl']) !== null && _b !== void 0 ? _b : 'https://labs-api.zapehr.com/v1';
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export { Lab };
|
|
78
|
+
//# sourceMappingURL=lab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lab.js","sources":["../../../../src/resources/classes/lab.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n LabOrderableItemListParams,\n LabOrderableItemListResponse,\n LabOrderableItemQuestionnaireGetParams,\n LabOrderableItemQuestionnaireGetResponse,\n LabOrderSubmitParams,\n LabRouteCreateParams,\n LabRouteDeleteParams,\n LabRouteListResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Lab extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['labApiUrl'] ?? 'https://labs-api.zapehr.com/v1';\n }\n /**\n * Gets a list of Routes associated with the project. Returns an empty list if no Routes are found.\n *\n * Access Policy Requirements:\n * Action: `Lab:GetRoutes`\n * Access Policy Resource: `Lab:Route`\n */\n routeList(request?: OystehrClientRequest): Promise<LabRouteListResponse> {\n return this.request('/route', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a route. A Route represents that a lab and particular customer have a relationship, and a Route is necessary to submit an order to a lab. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:CreateRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeCreate(params: LabRouteCreateParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/route', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:DeleteRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeDelete(params: LabRouteDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/route/{routeGuid}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(\n params: LabOrderableItemListParams,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemListResponse>;\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(request?: OystehrClientRequest): Promise<LabOrderableItemListResponse>;\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(\n params?: LabOrderableItemListParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemListResponse> {\n return this.request('/orderableItem', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Retrieve the AOE (Answer on Entry) Questionnaire for the given orderable item. The orderable item is defined by its labGuid, compendiumVersion, and itemCode. See [AOE](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#AOE) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemQuestionnaireGet(\n params: LabOrderableItemQuestionnaireGetParams,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemQuestionnaireGetResponse> {\n return this.request(\n '/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit a well configured ServiceRequest to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist.\n *\n * Access Policy Requirements:\n * Action: `Lab:SubmitOrder`\n * Access Policy Resource: `Lab:Order`\n */\n orderSubmit(params: LabOrderSubmitParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/submit', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;;AAAA;;AAgBM,MAAO,GAAI,SAAQ,WAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;KACf;AAID;;;;;;AAMG;AACH,IAAA,SAAS,CAAC,OAA8B,EAAA;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,yCAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC9E;AACD;;;;;;AAMG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,EAAA,iBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvF;AACD;;;;;;AAMG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,QAAQ,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,EAAA,iBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrG;AAoBD;;;;;;AAMG;IACH,iBAAiB,CACf,MAA0D,EAC1D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,EAAA,iBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9F;AACD;;;;;;AAMG;IACH,6BAA6B,CAC3B,MAA8C,EAC9C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,qGAAqG,EACrG,KAAK,EACL,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,EAAA,iBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;;AAMG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,EAAA,iBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxF;AACF,CAAA;;;AA3FG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,WAAW,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,gCAAgC,CAAC;AACjF,CAAC;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface LabOrderSubmitParams {
|
|
2
|
+
primaryId?: string;
|
|
3
|
+
/**
|
|
4
|
+
* Provided by the lab, indicates a financial relationship between the lab and the customer.
|
|
5
|
+
*/
|
|
6
|
+
accountNumber: string;
|
|
7
|
+
/**
|
|
8
|
+
* Valid ServiceRequest FHIR resource representing an order. See [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) for more details.
|
|
9
|
+
*/
|
|
10
|
+
serviceRequest: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface LabOrderableItemListParams {
|
|
2
|
+
cursor?: string;
|
|
3
|
+
itemCodes?: string;
|
|
4
|
+
itemCptCodes?: string;
|
|
5
|
+
itemLoincs?: string;
|
|
6
|
+
itemNames?: string;
|
|
7
|
+
labIds?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
sort?: 'itemCodes' | 'itemLoincs' | 'itemNames' | 'labIds';
|
|
10
|
+
sortOrder?: 'asc' | 'desc';
|
|
11
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { Questionnaire } from 'fhir/r4b';
|
|
2
|
+
/**
|
|
3
|
+
* orderable item results
|
|
4
|
+
*/
|
|
5
|
+
export interface LabOrderableItemListResponse {
|
|
6
|
+
orderableItems?: {
|
|
7
|
+
/**
|
|
8
|
+
* Identifying lab information and compendium version
|
|
9
|
+
*/
|
|
10
|
+
lab?: {
|
|
11
|
+
/**
|
|
12
|
+
* Identifying labGuid pertaining to the specific result
|
|
13
|
+
*/
|
|
14
|
+
labGuid?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Name of lab
|
|
17
|
+
*/
|
|
18
|
+
labName?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Description of lab
|
|
21
|
+
*/
|
|
22
|
+
labType?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Current compendium version for given lab
|
|
25
|
+
*/
|
|
26
|
+
compendiumVersion?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Specific orderable item details
|
|
30
|
+
*/
|
|
31
|
+
item?: {
|
|
32
|
+
/**
|
|
33
|
+
* Code uniquely identifying the orderable item for the given lab and compendium version
|
|
34
|
+
*/
|
|
35
|
+
itemCode?: string;
|
|
36
|
+
/**
|
|
37
|
+
* LOINC code associated with this orderable item.
|
|
38
|
+
*/
|
|
39
|
+
itemLoinc?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Type of orderable item
|
|
42
|
+
*/
|
|
43
|
+
itemType?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Name of the orderable item.
|
|
46
|
+
*/
|
|
47
|
+
itemName?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Unique name of the orderable item. Typically a combination of the itemCode and itemName
|
|
50
|
+
*/
|
|
51
|
+
uniqueName?: string;
|
|
52
|
+
/**
|
|
53
|
+
* List of the sample(s) that must be collected for this orderable item
|
|
54
|
+
*/
|
|
55
|
+
specimens?: {
|
|
56
|
+
/**
|
|
57
|
+
* Description of container necessary to store the sample.
|
|
58
|
+
*/
|
|
59
|
+
container?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Volume of the specimen to be collected
|
|
62
|
+
*/
|
|
63
|
+
volume?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Minimum volume of specimen below which teh test is not performable
|
|
66
|
+
*/
|
|
67
|
+
minimumVolume?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Instructions for storing the specimen after collection
|
|
70
|
+
*/
|
|
71
|
+
storageRequirements?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Instructions for how to collect the sample
|
|
74
|
+
*/
|
|
75
|
+
collectionInstructions?: string;
|
|
76
|
+
}[];
|
|
77
|
+
/**
|
|
78
|
+
* List of the component(s) comprising this orderable item
|
|
79
|
+
*/
|
|
80
|
+
components?: {
|
|
81
|
+
/**
|
|
82
|
+
* Description of container necessary to store the sample.
|
|
83
|
+
*/
|
|
84
|
+
componentItemCode?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Name of component
|
|
87
|
+
*/
|
|
88
|
+
name?: string;
|
|
89
|
+
/**
|
|
90
|
+
* LOINC code identifying the component
|
|
91
|
+
*/
|
|
92
|
+
loinc?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Unit of measurement
|
|
95
|
+
*/
|
|
96
|
+
uom?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Reference range associated with the component
|
|
99
|
+
*/
|
|
100
|
+
range?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Type of the component, such as List, Numeric, Free Text
|
|
103
|
+
*/
|
|
104
|
+
type?: string;
|
|
105
|
+
}[];
|
|
106
|
+
/**
|
|
107
|
+
* Array of CPT codes associated with the orderable item
|
|
108
|
+
*/
|
|
109
|
+
cptCodes?: {
|
|
110
|
+
/**
|
|
111
|
+
* CPT Code used for billing for medical services and procedures
|
|
112
|
+
*/
|
|
113
|
+
cptCode?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Number of billable units
|
|
116
|
+
*/
|
|
117
|
+
serviceUnitsCount?: number;
|
|
118
|
+
}[];
|
|
119
|
+
/**
|
|
120
|
+
* Answer On Entry Questionnaire. See FHIR Questionnaire for schema
|
|
121
|
+
*/
|
|
122
|
+
aoe?: Questionnaire;
|
|
123
|
+
};
|
|
124
|
+
}[];
|
|
125
|
+
/**
|
|
126
|
+
* Pagination details
|
|
127
|
+
*/
|
|
128
|
+
metadata?: {
|
|
129
|
+
/**
|
|
130
|
+
* Cursor to include in subsequent request for next page of results. Will be null if there are no more results.
|
|
131
|
+
*/
|
|
132
|
+
nextCursor?: string;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface LabRouteCreateParams {
|
|
2
|
+
primaryId?: string;
|
|
3
|
+
/**
|
|
4
|
+
* Provided by the lab, indicates a financial relationship between the lab and the customer.
|
|
5
|
+
*/
|
|
6
|
+
accountNumber: string;
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier of a lab. Searchable via orderable item Search.
|
|
9
|
+
*/
|
|
10
|
+
labGuid: string;
|
|
11
|
+
/**
|
|
12
|
+
* Name of the Primary (Practice or Provider depending on the Route). Required for certain labs. See [Create Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
13
|
+
*/
|
|
14
|
+
primaryName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Address of the Primary. Required for certain labs. See [Create Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
17
|
+
*/
|
|
18
|
+
primaryAddress?: {
|
|
19
|
+
address1: string;
|
|
20
|
+
address2?: string;
|
|
21
|
+
city: string;
|
|
22
|
+
stateProvinceCode: string;
|
|
23
|
+
postalCode: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* String representing accepted End User License Agreement Version. Required for certain labs. See [Create Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
27
|
+
*/
|
|
28
|
+
eulaVersion?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Name of individual who accepted the End User License Agreement. Required for certain labs. See [Create Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
31
|
+
*/
|
|
32
|
+
eulaAccepterFullName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* ISO string representing when the End User License Agreement was accepted. Required for certain labs. See [Create Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
35
|
+
*/
|
|
36
|
+
eulaAcceptanceDateTimeUtc?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Site ID for the Primary. ClientSiteID is assigned by the lab. This disambiguates instances where the same Account Number is used across multiple physical locations. Required for certain labs. See [Create Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
39
|
+
*/
|
|
40
|
+
clientSiteId?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of Routes associated with the calling projectId.
|
|
3
|
+
*/
|
|
4
|
+
export type LabRouteListResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier of the created Route.
|
|
7
|
+
*/
|
|
8
|
+
routeGuid?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier of a lab. Searchable via orderable item Search
|
|
11
|
+
*/
|
|
12
|
+
labGuid?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Provided by the lab, indicates a financial relationship between the lab and the customer.
|
|
15
|
+
*/
|
|
16
|
+
accountNumber?: string;
|
|
17
|
+
}[];
|
|
@@ -164,3 +164,11 @@ export * from './ZambdaLogStreamGetParams';
|
|
|
164
164
|
export * from './ZambdaLogStreamGetResponse';
|
|
165
165
|
export * from './FaxSendParams';
|
|
166
166
|
export * from './FaxSendResponse';
|
|
167
|
+
export * from './LabRouteListResponse';
|
|
168
|
+
export * from './LabRouteCreateParams';
|
|
169
|
+
export * from './LabRouteDeleteParams';
|
|
170
|
+
export * from './LabOrderableItemListParams';
|
|
171
|
+
export * from './LabOrderableItemListResponse';
|
|
172
|
+
export * from './LabOrderableItemQuestionnaireGetParams';
|
|
173
|
+
export * from './LabOrderableItemQuestionnaireGetResponse';
|
|
174
|
+
export * from './LabOrderSubmitParams';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oystehr/sdk",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"description": "Oystehr SDK",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "eslint .",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"parser": "ts-node debug-parser.ts",
|
|
15
15
|
"publish-to-npmjs": "npm run build && npm publish",
|
|
16
16
|
"publish-to-npmjs-next": "npm run build && npm publish --tag next",
|
|
17
|
-
"generate": "ts-node scripts/generate-sdk-v3 project,fax src/resources"
|
|
17
|
+
"generate": "ts-node scripts/generate-sdk-v3 project,fax,lab src/resources"
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
20
|
"npm": ">=8.0.0",
|
package/src/config.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { Developer } from './developer';
|
|
|
8
8
|
import { Erx } from './erx';
|
|
9
9
|
import { Fax } from './fax';
|
|
10
10
|
import { Fhir } from './fhir';
|
|
11
|
+
import { Lab } from './lab';
|
|
11
12
|
import { M2m } from './m2m';
|
|
12
13
|
import { Messaging } from './messaging';
|
|
13
14
|
import { PaymentMethod } from './paymentMethod';
|
|
@@ -45,6 +46,7 @@ export class Oystehr {
|
|
|
45
46
|
readonly zambda: Zambda;
|
|
46
47
|
readonly zambdaLogStream: ZambdaLogStream;
|
|
47
48
|
readonly fax: Fax;
|
|
49
|
+
readonly lab: Lab;
|
|
48
50
|
readonly fhir: Fhir;
|
|
49
51
|
constructor(config: OystehrConfig) {
|
|
50
52
|
this.config = config;
|
|
@@ -71,6 +73,7 @@ export class Oystehr {
|
|
|
71
73
|
this.zambda = new Zambda(config);
|
|
72
74
|
this.zambdaLogStream = new ZambdaLogStream(config);
|
|
73
75
|
this.fax = new Fax(config);
|
|
76
|
+
this.lab = new Lab(config);
|
|
74
77
|
this.fhir = new Fhir(config);
|
|
75
78
|
}
|
|
76
79
|
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
LabOrderableItemListParams,
|
|
5
|
+
LabOrderableItemListResponse,
|
|
6
|
+
LabOrderableItemQuestionnaireGetParams,
|
|
7
|
+
LabOrderableItemQuestionnaireGetResponse,
|
|
8
|
+
LabOrderSubmitParams,
|
|
9
|
+
LabRouteCreateParams,
|
|
10
|
+
LabRouteDeleteParams,
|
|
11
|
+
LabRouteListResponse,
|
|
12
|
+
OystehrClientRequest,
|
|
13
|
+
} from '../..';
|
|
14
|
+
import { SDKResource } from '../../client/client';
|
|
15
|
+
import { OystehrConfig } from '../../config';
|
|
16
|
+
|
|
17
|
+
export class Lab extends SDKResource {
|
|
18
|
+
constructor(config: OystehrConfig) {
|
|
19
|
+
super(config);
|
|
20
|
+
}
|
|
21
|
+
#baseUrlThunk(): string {
|
|
22
|
+
return this.config.services?.['labApiUrl'] ?? 'https://labs-api.zapehr.com/v1';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Gets a list of Routes associated with the project. Returns an empty list if no Routes are found.
|
|
26
|
+
*
|
|
27
|
+
* Access Policy Requirements:
|
|
28
|
+
* Action: `Lab:GetRoutes`
|
|
29
|
+
* Access Policy Resource: `Lab:Route`
|
|
30
|
+
*/
|
|
31
|
+
routeList(request?: OystehrClientRequest): Promise<LabRouteListResponse> {
|
|
32
|
+
return this.request('/route', 'get', this.#baseUrlThunk.bind(this))(request);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Create a route. A Route represents that a lab and particular customer have a relationship, and a Route is necessary to submit an order to a lab. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
|
|
36
|
+
*
|
|
37
|
+
* Access Policy Requirements:
|
|
38
|
+
* Action: `Lab:CreateRoute`
|
|
39
|
+
* Access Policy Resource: `Lab:Route`
|
|
40
|
+
*/
|
|
41
|
+
routeCreate(params: LabRouteCreateParams, request?: OystehrClientRequest): Promise<void> {
|
|
42
|
+
return this.request('/route', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.
|
|
46
|
+
*
|
|
47
|
+
* Access Policy Requirements:
|
|
48
|
+
* Action: `Lab:DeleteRoute`
|
|
49
|
+
* Access Policy Resource: `Lab:Route`
|
|
50
|
+
*/
|
|
51
|
+
routeDelete(params: LabRouteDeleteParams, request?: OystehrClientRequest): Promise<void> {
|
|
52
|
+
return this.request('/route/{routeGuid}', 'delete', this.#baseUrlThunk.bind(this))(params, request);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.
|
|
56
|
+
*
|
|
57
|
+
* Access Policy Requirements:
|
|
58
|
+
* Action: `Lab:SearchOrderableItems`
|
|
59
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
60
|
+
*/
|
|
61
|
+
orderableItemList(
|
|
62
|
+
params: LabOrderableItemListParams,
|
|
63
|
+
request?: OystehrClientRequest
|
|
64
|
+
): Promise<LabOrderableItemListResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.
|
|
67
|
+
*
|
|
68
|
+
* Access Policy Requirements:
|
|
69
|
+
* Action: `Lab:SearchOrderableItems`
|
|
70
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
71
|
+
*/
|
|
72
|
+
orderableItemList(request?: OystehrClientRequest): Promise<LabOrderableItemListResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.
|
|
75
|
+
*
|
|
76
|
+
* Access Policy Requirements:
|
|
77
|
+
* Action: `Lab:SearchOrderableItems`
|
|
78
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
79
|
+
*/
|
|
80
|
+
orderableItemList(
|
|
81
|
+
params?: LabOrderableItemListParams | OystehrClientRequest,
|
|
82
|
+
request?: OystehrClientRequest
|
|
83
|
+
): Promise<LabOrderableItemListResponse> {
|
|
84
|
+
return this.request('/orderableItem', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Retrieve the AOE (Answer on Entry) Questionnaire for the given orderable item. The orderable item is defined by its labGuid, compendiumVersion, and itemCode. See [AOE](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#AOE) for more details.
|
|
88
|
+
*
|
|
89
|
+
* Access Policy Requirements:
|
|
90
|
+
* Action: `Lab:SearchOrderableItems`
|
|
91
|
+
* Access Policy Resource: `Lab:OrderableItem`
|
|
92
|
+
*/
|
|
93
|
+
orderableItemQuestionnaireGet(
|
|
94
|
+
params: LabOrderableItemQuestionnaireGetParams,
|
|
95
|
+
request?: OystehrClientRequest
|
|
96
|
+
): Promise<LabOrderableItemQuestionnaireGetResponse> {
|
|
97
|
+
return this.request(
|
|
98
|
+
'/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire',
|
|
99
|
+
'get',
|
|
100
|
+
this.#baseUrlThunk.bind(this)
|
|
101
|
+
)(params, request);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit a well configured ServiceRequest to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist.
|
|
105
|
+
*
|
|
106
|
+
* Access Policy Requirements:
|
|
107
|
+
* Action: `Lab:SubmitOrder`
|
|
108
|
+
* Access Policy Resource: `Lab:Order`
|
|
109
|
+
*/
|
|
110
|
+
orderSubmit(params: LabOrderSubmitParams, request?: OystehrClientRequest): Promise<void> {
|
|
111
|
+
return this.request('/submit', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
2
|
+
|
|
3
|
+
export interface LabOrderSubmitParams {
|
|
4
|
+
primaryId?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Provided by the lab, indicates a financial relationship between the lab and the customer.
|
|
7
|
+
*/
|
|
8
|
+
accountNumber: string;
|
|
9
|
+
/**
|
|
10
|
+
* Valid ServiceRequest FHIR resource representing an order. See [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) for more details.
|
|
11
|
+
*/
|
|
12
|
+
serviceRequest: string;
|
|
13
|
+
}
|