@oystehr/sdk 4.0.0-alpha.6 → 4.0.0
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/client/client.cjs +259 -0
- package/dist/cjs/client/client.cjs.map +1 -0
- package/dist/cjs/errors/index.cjs +58 -0
- package/dist/cjs/errors/index.cjs.map +1 -0
- package/dist/cjs/index.cjs +11 -1980
- 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/application.cjs +88 -0
- package/dist/cjs/resources/classes/application.cjs.map +1 -0
- package/dist/cjs/resources/classes/charge.cjs +44 -0
- package/dist/cjs/resources/classes/charge.cjs.map +1 -0
- package/dist/cjs/resources/classes/conversation-ext.cjs +31 -0
- package/dist/cjs/resources/classes/conversation-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/conversation.cjs +84 -0
- package/dist/cjs/resources/classes/conversation.cjs.map +1 -0
- package/dist/cjs/resources/classes/developer.cjs +72 -0
- package/dist/cjs/resources/classes/developer.cjs.map +1 -0
- package/dist/cjs/resources/classes/erx.cjs +88 -0
- package/dist/cjs/resources/classes/erx.cjs.map +1 -0
- package/dist/cjs/resources/classes/erx.d.ts +5 -1
- package/dist/cjs/resources/classes/erxV1.cjs +46 -0
- package/dist/cjs/resources/classes/erxV1.cjs.map +1 -0
- package/dist/cjs/resources/classes/erxV2.cjs +22 -0
- package/dist/cjs/resources/classes/erxV2.cjs.map +1 -0
- package/dist/cjs/resources/classes/fax.cjs +46 -0
- package/dist/cjs/resources/classes/fax.cjs.map +1 -0
- package/dist/cjs/resources/classes/fhir-ext.cjs +200 -0
- package/dist/cjs/resources/classes/fhir-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/fhir-ext.d.ts +7 -7
- package/dist/cjs/resources/classes/fhir.cjs +34 -0
- package/dist/cjs/resources/classes/fhir.cjs.map +1 -0
- package/dist/cjs/resources/classes/fhir.d.ts +2 -2
- package/dist/cjs/resources/classes/index.cjs +88 -0
- package/dist/cjs/resources/classes/index.cjs.map +1 -0
- package/dist/cjs/resources/classes/lab.cjs +76 -0
- package/dist/cjs/resources/classes/lab.cjs.map +1 -0
- package/dist/cjs/resources/classes/m2m.cjs +81 -0
- package/dist/cjs/resources/classes/m2m.cjs.map +1 -0
- package/dist/cjs/resources/classes/messaging.cjs +22 -0
- package/dist/cjs/resources/classes/messaging.cjs.map +1 -0
- package/dist/cjs/resources/classes/paymentMethod.cjs +88 -0
- package/dist/cjs/resources/classes/paymentMethod.cjs.map +1 -0
- package/dist/cjs/resources/classes/project.cjs +34 -0
- package/dist/cjs/resources/classes/project.cjs.map +1 -0
- package/dist/cjs/resources/classes/rcm.cjs +55 -0
- package/dist/cjs/resources/classes/rcm.cjs.map +1 -0
- package/dist/cjs/resources/classes/role.cjs +62 -0
- package/dist/cjs/resources/classes/role.cjs.map +1 -0
- package/dist/cjs/resources/classes/secret.cjs +52 -0
- package/dist/cjs/resources/classes/secret.cjs.map +1 -0
- package/dist/cjs/resources/classes/telemed.cjs +43 -0
- package/dist/cjs/resources/classes/telemed.cjs.map +1 -0
- package/dist/cjs/resources/classes/transactionalSMS.cjs +34 -0
- package/dist/cjs/resources/classes/transactionalSMS.cjs.map +1 -0
- package/dist/cjs/resources/classes/user.cjs +80 -0
- package/dist/cjs/resources/classes/user.cjs.map +1 -0
- package/dist/cjs/resources/classes/version.cjs +22 -0
- package/dist/cjs/resources/classes/version.cjs.map +1 -0
- package/dist/cjs/resources/classes/z3-ext.cjs +81 -0
- package/dist/cjs/resources/classes/z3-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/z3.cjs +88 -0
- package/dist/cjs/resources/classes/z3.cjs.map +1 -0
- package/dist/cjs/resources/classes/zambda-ext.cjs +15 -0
- package/dist/cjs/resources/classes/zambda-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/zambda.cjs +89 -0
- package/dist/cjs/resources/classes/zambda.cjs.map +1 -0
- package/dist/cjs/resources/classes/zambdaLogStream.cjs +43 -0
- package/dist/cjs/resources/classes/zambdaLogStream.cjs.map +1 -0
- package/dist/cjs/resources/types/ErxGetConfigurationResponse.d.ts +9 -0
- package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +5 -1
- package/dist/cjs/resources/types/ZambdaFunction.d.ts +1 -1
- package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +1 -1
- package/dist/cjs/resources/types/index.d.ts +1 -0
- package/dist/esm/client/client.js +68 -67
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/errors/index.js +3 -2
- package/dist/esm/errors/index.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/node_modules/tslib/package.json +1 -0
- package/dist/esm/resources/classes/application.js +11 -15
- package/dist/esm/resources/classes/application.js.map +1 -1
- package/dist/esm/resources/classes/charge.js +5 -9
- package/dist/esm/resources/classes/charge.js.map +1 -1
- package/dist/esm/resources/classes/conversation-ext.js +4 -5
- package/dist/esm/resources/classes/conversation-ext.js.map +1 -1
- package/dist/esm/resources/classes/conversation.js +16 -20
- package/dist/esm/resources/classes/conversation.js.map +1 -1
- package/dist/esm/resources/classes/developer.js +9 -13
- package/dist/esm/resources/classes/developer.js.map +1 -1
- package/dist/esm/resources/classes/erx.d.ts +5 -1
- package/dist/esm/resources/classes/erx.js +20 -18
- package/dist/esm/resources/classes/erx.js.map +1 -1
- package/dist/esm/resources/classes/erxV1.js +8 -12
- package/dist/esm/resources/classes/erxV1.js.map +1 -1
- package/dist/esm/resources/classes/erxV2.js +4 -8
- package/dist/esm/resources/classes/erxV2.js.map +1 -1
- package/dist/esm/resources/classes/fax.js +6 -10
- package/dist/esm/resources/classes/fax.js.map +1 -1
- package/dist/esm/resources/classes/fhir-ext.d.ts +7 -7
- package/dist/esm/resources/classes/fhir-ext.js +71 -62
- package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
- package/dist/esm/resources/classes/fhir.d.ts +2 -2
- package/dist/esm/resources/classes/fhir.js +20 -20
- package/dist/esm/resources/classes/fhir.js.map +1 -1
- package/dist/esm/resources/classes/index.js +28 -5
- package/dist/esm/resources/classes/index.js.map +1 -1
- package/dist/esm/resources/classes/lab.js +9 -13
- package/dist/esm/resources/classes/lab.js.map +1 -1
- package/dist/esm/resources/classes/m2m.js +10 -14
- package/dist/esm/resources/classes/m2m.js.map +1 -1
- package/dist/esm/resources/classes/messaging.js +4 -8
- package/dist/esm/resources/classes/messaging.js.map +1 -1
- package/dist/esm/resources/classes/paymentMethod.js +7 -11
- package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
- package/dist/esm/resources/classes/project.js +5 -9
- package/dist/esm/resources/classes/project.js.map +1 -1
- package/dist/esm/resources/classes/rcm.js +6 -10
- package/dist/esm/resources/classes/rcm.js.map +1 -1
- package/dist/esm/resources/classes/role.js +8 -12
- package/dist/esm/resources/classes/role.js.map +1 -1
- package/dist/esm/resources/classes/secret.js +7 -11
- package/dist/esm/resources/classes/secret.js.map +1 -1
- package/dist/esm/resources/classes/telemed.js +5 -9
- package/dist/esm/resources/classes/telemed.js.map +1 -1
- package/dist/esm/resources/classes/transactionalSMS.js +4 -8
- package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
- package/dist/esm/resources/classes/user.js +10 -14
- package/dist/esm/resources/classes/user.js.map +1 -1
- package/dist/esm/resources/classes/version.js +4 -8
- package/dist/esm/resources/classes/version.js.map +1 -1
- package/dist/esm/resources/classes/z3-ext.js +47 -56
- package/dist/esm/resources/classes/z3-ext.js.map +1 -1
- package/dist/esm/resources/classes/z3.js +26 -30
- package/dist/esm/resources/classes/z3.js.map +1 -1
- package/dist/esm/resources/classes/zambda-ext.js +6 -11
- package/dist/esm/resources/classes/zambda-ext.js.map +1 -1
- package/dist/esm/resources/classes/zambda.js +12 -16
- package/dist/esm/resources/classes/zambda.js.map +1 -1
- package/dist/esm/resources/classes/zambdaLogStream.js +6 -10
- package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
- package/dist/esm/resources/types/ErxGetConfigurationResponse.d.ts +9 -0
- package/dist/esm/resources/types/ZambdaCreateParams.d.ts +5 -1
- package/dist/esm/resources/types/ZambdaFunction.d.ts +1 -1
- package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +1 -1
- package/dist/esm/resources/types/index.d.ts +1 -0
- package/package.json +4 -3
- package/rollup.config-cjs.mjs +97 -18
- package/src/resources/classes/erx.ts +7 -0
- package/src/resources/classes/fhir-ext.ts +5 -5
- package/src/resources/types/ErxGetConfigurationResponse.ts +11 -0
- package/src/resources/types/ZambdaCreateParams.ts +5 -1
- package/src/resources/types/ZambdaFunction.ts +1 -1
- package/src/resources/types/ZambdaUpdateParams.ts +1 -1
- package/src/resources/types/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erx.js","sources":["../../../../src/resources/classes/erx.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxCancelPrescriptionParams,\n ErxCheckAllergyInteractionsParams,\n ErxCheckAllergyInteractionsResponse,\n ErxCheckMedicationInteractionsParams,\n ErxCheckMedicationInteractionsResponse,\n ErxCheckPractitionerEnrollmentParams,\n ErxCheckPractitionerEnrollmentResponse,\n ErxCheckPrecheckInteractionsParams,\n ErxCheckPrecheckInteractionsResponse,\n ErxConnectPractitionerParams,\n ErxConnectPractitionerResponse,\n ErxEnrollPractitionerParams,\n ErxSearchAllergensParams,\n ErxSearchAllergensResponse,\n ErxSearchMedicationsParams,\n ErxSearchMedicationsResponse,\n ErxSyncPatientParams,\n ErxUnenrollPractitionerParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Erx extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';\n }\n /**\n * Search for allergens.\n */\n searchAllergens(\n params: ErxSearchAllergensParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchAllergensResponse> {\n return this.request('/allergen', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications.\n */\n searchMedications(\n params: ErxSearchMedicationsParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchMedicationsResponse> {\n return this.request('/medication', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.\n */\n checkAllergyInteractions(\n params: ErxCheckAllergyInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckAllergyInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/allergy',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.\n */\n checkMedicationInteractions(\n params: ErxCheckMedicationInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckMedicationInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/medication',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.\n */\n checkPrecheckInteractions(\n params: ErxCheckPrecheckInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPrecheckInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/precheck/{drugId}',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Cancel prescription for patient.\n */\n cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/patient/{patientId}/prescriptions/{medicationRequestId}',\n 'delete',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.\n */\n syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/patient/{patientId}/sync', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params: ErxConnectPractitionerParams,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(request?: OystehrClientRequest): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params?: ErxConnectPractitionerParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse> {\n return this.request('/practitioner/connect', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Check eRx enrollment for a practitioner.\n */\n checkPractitionerEnrollment(\n params: ErxCheckPractitionerEnrollmentParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPractitionerEnrollmentResponse> {\n return this.request('/practitioner/{practitionerId}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Enroll a practitioner in the eRx service.\n */\n enrollPractitioner(params: ErxEnrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Unenroll a practitioner from the eRx service.\n */\n unenrollPractitioner(params: ErxUnenrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"erx.js","sources":["../../../../src/resources/classes/erx.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxCancelPrescriptionParams,\n ErxCheckAllergyInteractionsParams,\n ErxCheckAllergyInteractionsResponse,\n ErxCheckMedicationInteractionsParams,\n ErxCheckMedicationInteractionsResponse,\n ErxCheckPractitionerEnrollmentParams,\n ErxCheckPractitionerEnrollmentResponse,\n ErxCheckPrecheckInteractionsParams,\n ErxCheckPrecheckInteractionsResponse,\n ErxConnectPractitionerParams,\n ErxConnectPractitionerResponse,\n ErxEnrollPractitionerParams,\n ErxGetConfigurationResponse,\n ErxSearchAllergensParams,\n ErxSearchAllergensResponse,\n ErxSearchMedicationsParams,\n ErxSearchMedicationsResponse,\n ErxSyncPatientParams,\n ErxUnenrollPractitionerParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Erx extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';\n }\n /**\n * Search for allergens.\n */\n searchAllergens(\n params: ErxSearchAllergensParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchAllergensResponse> {\n return this.request('/allergen', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications.\n */\n searchMedications(\n params: ErxSearchMedicationsParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchMedicationsResponse> {\n return this.request('/medication', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get eRx configuration for project.\n */\n getConfiguration(request?: OystehrClientRequest): Promise<ErxGetConfigurationResponse> {\n return this.request('/config', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.\n */\n checkAllergyInteractions(\n params: ErxCheckAllergyInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckAllergyInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/allergy',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.\n */\n checkMedicationInteractions(\n params: ErxCheckMedicationInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckMedicationInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/medication',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.\n */\n checkPrecheckInteractions(\n params: ErxCheckPrecheckInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPrecheckInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/precheck/{drugId}',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Cancel prescription for patient.\n */\n cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/patient/{patientId}/prescriptions/{medicationRequestId}',\n 'delete',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.\n */\n syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/patient/{patientId}/sync', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params: ErxConnectPractitionerParams,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(request?: OystehrClientRequest): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params?: ErxConnectPractitionerParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse> {\n return this.request('/practitioner/connect', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Check eRx enrollment for a practitioner.\n */\n checkPractitionerEnrollment(\n params: ErxCheckPractitionerEnrollmentParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPractitionerEnrollmentResponse> {\n return this.request('/practitioner/{practitionerId}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Enroll a practitioner in the eRx service.\n */\n enrollPractitioner(params: ErxEnrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Unenroll a practitioner from the eRx service.\n */\n unenrollPractitioner(params: ErxUnenrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AA2BM,MAAO,GAAI,SAAQ,WAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,+BAA+B,CAAC;KAC/E;AACD;;AAEG;IACH,eAAe,CACb,MAAgC,EAChC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzF;AACD;;AAEG;IACH,iBAAiB,CACf,MAAkC,EAClC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAA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IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC1G;AAYD;;AAEG;IACH,mBAAmB,CACjB,MAA4D,EAC5D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrG;AACD;;AAEG;IACH,2BAA2B,CACzB,MAA4C,EAC5C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9G;AACD;;AAEG;IACH,kBAAkB,CAAC,MAAmC,EAAE,OAA8B,EAAA;QACpF,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/G;AACD;;AAEG;IACH,oBAAoB,CAAC,MAAqC,EAAE,OAA8B,EAAA;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjH;AACF;;;;"}
|
|
@@ -1,48 +1,44 @@
|
|
|
1
|
-
import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import { SDKResource } from '../../client/client.js';
|
|
3
2
|
|
|
4
3
|
// AUTOGENERATED -- DO NOT EDIT
|
|
5
|
-
var _ErxV1_instances, _ErxV1_baseUrlThunk;
|
|
6
4
|
class ErxV1 extends SDKResource {
|
|
7
5
|
constructor(config) {
|
|
8
6
|
super(config);
|
|
9
|
-
|
|
7
|
+
}
|
|
8
|
+
#baseUrlThunk() {
|
|
9
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Retrieve patient properties from FHIR service and sync them with eRx service
|
|
13
13
|
*/
|
|
14
14
|
syncPatient(params, request) {
|
|
15
|
-
return this.request('/erx/sync-patient/{patientId}', 'post',
|
|
15
|
+
return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Search for allergies
|
|
19
19
|
*/
|
|
20
20
|
allergySearch(params, request) {
|
|
21
|
-
return this.request('/erx/allergy/search', 'get',
|
|
21
|
+
return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Cancel photon order
|
|
25
25
|
*/
|
|
26
26
|
cancelOrder(params, request) {
|
|
27
|
-
return this.request('/erx/cancel-order', 'post',
|
|
27
|
+
return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Cancel photon prescription
|
|
31
31
|
*/
|
|
32
32
|
cancelPrescription(params, request) {
|
|
33
|
-
return this.request('/erx/cancel-prescription', 'post',
|
|
33
|
+
return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Search for medications. Provide at least one of code or name filters
|
|
37
37
|
*/
|
|
38
38
|
medicationSearch(params, request) {
|
|
39
|
-
return this.request('/erx/medication/search', 'get',
|
|
39
|
+
return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
_ErxV1_instances = new WeakSet(), _ErxV1_baseUrlThunk = function _ErxV1_baseUrlThunk() {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
45
|
-
};
|
|
46
42
|
|
|
47
43
|
export { ErxV1 };
|
|
48
44
|
//# sourceMappingURL=erxV1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erxV1.js","sources":["../../../../src/resources/classes/erxV1.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxV1AllergySearchParams,\n ErxV1AllergySearchResponse,\n ErxV1CancelOrderParams,\n ErxV1CancelOrderResponse,\n ErxV1CancelPrescriptionParams,\n ErxV1CancelPrescriptionResponse,\n ErxV1MedicationSearchParams,\n ErxV1MedicationSearchResponse,\n ErxV1SyncPatientParams,\n ErxV1SyncPatientResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV1 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Retrieve patient properties from FHIR service and sync them with eRx service\n */\n syncPatient(params: ErxV1SyncPatientParams, request?: OystehrClientRequest): Promise<ErxV1SyncPatientResponse> {\n return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for allergies\n */\n allergySearch(params: ErxV1AllergySearchParams, request?: OystehrClientRequest): Promise<ErxV1AllergySearchResponse> {\n return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon order\n */\n cancelOrder(params: ErxV1CancelOrderParams, request?: OystehrClientRequest): Promise<ErxV1CancelOrderResponse> {\n return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon prescription\n */\n cancelPrescription(\n params: ErxV1CancelPrescriptionParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1CancelPrescriptionResponse> {\n return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV1MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV1MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse> {\n return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"erxV1.js","sources":["../../../../src/resources/classes/erxV1.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxV1AllergySearchParams,\n ErxV1AllergySearchResponse,\n ErxV1CancelOrderParams,\n ErxV1CancelOrderResponse,\n ErxV1CancelPrescriptionParams,\n ErxV1CancelPrescriptionResponse,\n ErxV1MedicationSearchParams,\n ErxV1MedicationSearchResponse,\n ErxV1SyncPatientParams,\n ErxV1SyncPatientResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV1 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Retrieve patient properties from FHIR service and sync them with eRx service\n */\n syncPatient(params: ErxV1SyncPatientParams, request?: OystehrClientRequest): Promise<ErxV1SyncPatientResponse> {\n return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for allergies\n */\n allergySearch(params: ErxV1AllergySearchParams, request?: OystehrClientRequest): Promise<ErxV1AllergySearchResponse> {\n return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon order\n */\n cancelOrder(params: ErxV1CancelOrderParams, request?: OystehrClientRequest): Promise<ErxV1CancelOrderResponse> {\n return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon prescription\n */\n cancelPrescription(\n params: ErxV1CancelPrescriptionParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1CancelPrescriptionResponse> {\n return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV1MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV1MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse> {\n return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAkBM,MAAO,KAAM,SAAQ,WAAW,CAAA;AACpC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AACD;;AAEG;IACH,WAAW,CAAC,MAA8B,EAAE,OAA8B,EAAA;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9G;AACD;;AAEG;IACH,aAAa,CAAC,MAAgC,EAAE,OAA8B,EAAA;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnG;AACD;;AAEG;IACH,WAAW,CAAC,MAA8B,EAAE,OAA8B,EAAA;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACD;;AAEG;IACH,kBAAkB,CAChB,MAAqC,EACrC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzG;AAYD;;AAEG;IACH,gBAAgB,CACd,MAA2D,EAC3D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtG;AACF;;;;"}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import { SDKResource } from '../../client/client.js';
|
|
3
2
|
|
|
4
3
|
// AUTOGENERATED -- DO NOT EDIT
|
|
5
|
-
var _ErxV2_instances, _ErxV2_baseUrlThunk;
|
|
6
4
|
class ErxV2 extends SDKResource {
|
|
7
5
|
constructor(config) {
|
|
8
6
|
super(config);
|
|
9
|
-
|
|
7
|
+
}
|
|
8
|
+
#baseUrlThunk() {
|
|
9
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Search for medications. Provide at least one of code or name filters
|
|
13
13
|
*/
|
|
14
14
|
medicationSearch(params, request) {
|
|
15
|
-
return this.request('/erx/v2/medication/search', 'get',
|
|
15
|
+
return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
_ErxV2_instances = new WeakSet(), _ErxV2_baseUrlThunk = function _ErxV2_baseUrlThunk() {
|
|
19
|
-
var _a, _b;
|
|
20
|
-
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
21
|
-
};
|
|
22
18
|
|
|
23
19
|
export { ErxV2 };
|
|
24
20
|
//# sourceMappingURL=erxV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erxV2.js","sources":["../../../../src/resources/classes/erxV2.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { ErxV2MedicationSearchParams, ErxV2MedicationSearchResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV2 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV2MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV2MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse> {\n return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"erxV2.js","sources":["../../../../src/resources/classes/erxV2.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { ErxV2MedicationSearchParams, ErxV2MedicationSearchResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV2 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV2MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV2MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse> {\n return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,KAAM,SAAQ,WAAW,CAAA;AACpC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AAYD;;AAEG;IACH,gBAAgB,CACd,MAA2D,EAC3D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzG;AACF;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import { SDKResource } from '../../client/client.js';
|
|
3
2
|
|
|
4
3
|
// AUTOGENERATED -- DO NOT EDIT
|
|
5
|
-
var _Fax_instances, _Fax_baseUrlThunk;
|
|
6
4
|
class Fax extends SDKResource {
|
|
7
5
|
constructor(config) {
|
|
8
6
|
super(config);
|
|
9
|
-
|
|
7
|
+
}
|
|
8
|
+
#baseUrlThunk() {
|
|
9
|
+
return this.config.services?.['faxApiUrl'] ?? 'https://fax-api.zapehr.com/v1';
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Offboard a fax number. Oystehr's [offboard](https://docs.oystehr.com/oystehr/services/fax/number/) feature makes it easy to stop using the fax service and release the project's assigned fax number with a single API call. Please note there is no way to guarantee getting the same number back again, so if you think this can break your project in any way we recommend not offboarding and avoid sending faxes until you're sure.
|
|
@@ -16,7 +16,7 @@ class Fax extends SDKResource {
|
|
|
16
16
|
* Access Policy Resource: `Fax:Number`
|
|
17
17
|
*/
|
|
18
18
|
offboard(request) {
|
|
19
|
-
return this.request('/offboard', 'post',
|
|
19
|
+
return this.request('/offboard', 'post', this.#baseUrlThunk.bind(this))(request);
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Onboard a fax number. Oystehr's [onboard](https://docs.oystehr.com/oystehr/services/fax/number/) feature makes it easy to start using the fax service and purchase a new fax number for your project with a single API call.
|
|
@@ -26,7 +26,7 @@ class Fax extends SDKResource {
|
|
|
26
26
|
* Access Policy Resource: `Fax:Number`
|
|
27
27
|
*/
|
|
28
28
|
onboard(request) {
|
|
29
|
-
return this.request('/onboard', 'post',
|
|
29
|
+
return this.request('/onboard', 'post', this.#baseUrlThunk.bind(this))(request);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/oystehr/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.
|
|
@@ -36,13 +36,9 @@ class Fax extends SDKResource {
|
|
|
36
36
|
* Access Policy Resource: `Fax:Fax`
|
|
37
37
|
*/
|
|
38
38
|
send(params, request) {
|
|
39
|
-
return this.request('/send', 'post',
|
|
39
|
+
return this.request('/send', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
_Fax_instances = new WeakSet(), _Fax_baseUrlThunk = function _Fax_baseUrlThunk() {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['faxApiUrl']) !== null && _b !== void 0 ? _b : 'https://fax-api.zapehr.com/v1';
|
|
45
|
-
};
|
|
46
42
|
|
|
47
43
|
export { Fax };
|
|
48
44
|
//# sourceMappingURL=fax.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fax.js","sources":["../../../../src/resources/classes/fax.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { FaxSendParams, FaxSendResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Fax extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['faxApiUrl'] ?? 'https://fax-api.zapehr.com/v1';\n }\n /**\n * Offboard a fax number. Oystehr's [offboard](https://docs.oystehr.com/oystehr/services/fax/number/) feature makes it easy to stop using the fax service and release the project's assigned fax number with a single API call. Please note there is no way to guarantee getting the same number back again, so if you think this can break your project in any way we recommend not offboarding and avoid sending faxes until you're sure.\n *\n * Access Policy Requirements:\n * Action: `Fax:Offboard`\n * Access Policy Resource: `Fax:Number`\n */\n offboard(request?: OystehrClientRequest): Promise<void> {\n return this.request('/offboard', 'post', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Onboard a fax number. Oystehr's [onboard](https://docs.oystehr.com/oystehr/services/fax/number/) feature makes it easy to start using the fax service and purchase a new fax number for your project with a single API call.\n *\n * Access Policy Requirements:\n * Action: `Fax:Onboard`\n * Access Policy Resource: `Fax:Number`\n */\n onboard(request?: OystehrClientRequest): Promise<void> {\n return this.request('/onboard', 'post', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/oystehr/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.\n *\n * Access Policy Requirements:\n * Action: `Fax:Send`\n * Access Policy Resource: `Fax:Fax`\n */\n send(params: FaxSendParams, request?: OystehrClientRequest): Promise<FaxSendResponse> {\n return this.request('/send', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fax.js","sources":["../../../../src/resources/classes/fax.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { FaxSendParams, FaxSendResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Fax extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['faxApiUrl'] ?? 'https://fax-api.zapehr.com/v1';\n }\n /**\n * Offboard a fax number. Oystehr's [offboard](https://docs.oystehr.com/oystehr/services/fax/number/) feature makes it easy to stop using the fax service and release the project's assigned fax number with a single API call. Please note there is no way to guarantee getting the same number back again, so if you think this can break your project in any way we recommend not offboarding and avoid sending faxes until you're sure.\n *\n * Access Policy Requirements:\n * Action: `Fax:Offboard`\n * Access Policy Resource: `Fax:Number`\n */\n offboard(request?: OystehrClientRequest): Promise<void> {\n return this.request('/offboard', 'post', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Onboard a fax number. Oystehr's [onboard](https://docs.oystehr.com/oystehr/services/fax/number/) feature makes it easy to start using the fax service and purchase a new fax number for your project with a single API call.\n *\n * Access Policy Requirements:\n * Action: `Fax:Onboard`\n * Access Policy Resource: `Fax:Number`\n */\n onboard(request?: OystehrClientRequest): Promise<void> {\n return this.request('/onboard', 'post', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/oystehr/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.\n *\n * Access Policy Requirements:\n * Action: `Fax:Send`\n * Access Policy Resource: `Fax:Fax`\n */\n send(params: FaxSendParams, request?: OystehrClientRequest): Promise<FaxSendResponse> {\n return this.request('/send', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,GAAI,SAAQ,WAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,+BAA+B,CAAC;KAC/E;AACD;;;;;;AAMG;AACH,IAAA,QAAQ,CAAC,OAA8B,EAAA;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAClF;AACD;;;;;;AAMG;AACH,IAAA,OAAO,CAAC,OAA8B,EAAA;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACjF;AACD;;;;;;AAMG;IACH,IAAI,CAAC,MAAqB,EAAE,OAA8B,EAAA;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtF;AACF;;;;"}
|
|
@@ -23,17 +23,17 @@ export interface OystehrFHIRUpdateClientRequest extends OystehrClientRequest {
|
|
|
23
23
|
* @param request optional OystehrClientRequest object
|
|
24
24
|
* @returns FHIR Bundle resource
|
|
25
25
|
*/
|
|
26
|
-
export declare function search<T extends FhirResource>(this: SDKResource, params: FhirSearchParams
|
|
26
|
+
export declare function search<T extends FhirResource>(this: SDKResource, params: FhirSearchParams<T>, request?: OystehrClientRequest): Promise<FhirFetcherResponse<Bundle<T>>>;
|
|
27
27
|
export declare function create<T extends FhirResource>(this: SDKResource, params: FhirCreateParams<T>, request?: OystehrClientRequest): Promise<FhirFetcherResponse<T>>;
|
|
28
28
|
export declare function get<T extends FhirResource>(this: SDKResource, { resourceType, id }: FhirGetParams<T>, request?: OystehrClientRequest): Promise<FhirFetcherResponse<T>>;
|
|
29
29
|
export declare function update<T extends FhirResource>(this: SDKResource, params: FhirUpdateParams<T>, request?: OystehrFHIRUpdateClientRequest): Promise<FhirFetcherResponse<T>>;
|
|
30
|
-
export declare function patch<T extends FhirResource>(this: SDKResource, { resourceType, id, operations }: FhirPatchParams
|
|
31
|
-
declare function del<T extends FhirResource>(this: SDKResource, { resourceType, id }: FhirDeleteParams
|
|
30
|
+
export declare function patch<T extends FhirResource>(this: SDKResource, { resourceType, id, operations }: FhirPatchParams<T>, request?: OystehrFHIRUpdateClientRequest): Promise<FhirFetcherResponse<T>>;
|
|
31
|
+
declare function del<T extends FhirResource>(this: SDKResource, { resourceType, id }: FhirDeleteParams<T>, request?: OystehrClientRequest): Promise<FhirFetcherResponse<T>>;
|
|
32
32
|
export { del as delete };
|
|
33
|
-
export declare function history<T extends FhirResource>(this: SDKResource, { resourceType, id }: FhirHistorySearchParams
|
|
34
|
-
export declare function history<T extends FhirResource>(this: SDKResource, { resourceType, id, versionId }: FhirHistoryGetParams
|
|
35
|
-
export declare const batch: <BundleContentType extends FhirResource>(this: SDKResource, input: BatchInput<BundleContentType>, request?: OystehrClientRequest) => Promise<Bundle<BundleContentType
|
|
36
|
-
export declare const transaction: <BundleContentType extends FhirResource>(this: SDKResource, input: BatchInput<BundleContentType>, request?: OystehrClientRequest) => Promise<Bundle<BundleContentType
|
|
33
|
+
export declare function history<T extends FhirResource>(this: SDKResource, { resourceType, id }: FhirHistorySearchParams<T>, request?: OystehrClientRequest): Promise<FhirFetcherResponse<Bundle<T>>>;
|
|
34
|
+
export declare function history<T extends FhirResource>(this: SDKResource, { resourceType, id, versionId }: FhirHistoryGetParams<T>, request?: OystehrClientRequest): Promise<FhirFetcherResponse<T>>;
|
|
35
|
+
export declare const batch: <BundleContentType extends FhirResource>(this: SDKResource, input: BatchInput<BundleContentType>, request?: OystehrClientRequest) => Promise<FhirFetcherResponse<Bundle<BundleContentType>>>;
|
|
36
|
+
export declare const transaction: <BundleContentType extends FhirResource>(this: SDKResource, input: BatchInput<BundleContentType>, request?: OystehrClientRequest) => Promise<FhirFetcherResponse<Bundle<BundleContentType>>>;
|
|
37
37
|
export declare function formatAddress(address: AddressR4B | AddressR5, options?: {
|
|
38
38
|
all?: boolean;
|
|
39
39
|
use?: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import { addParamsToSearch } from '../../client/client.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -8,58 +7,57 @@ import { addParamsToSearch } from '../../client/client.js';
|
|
|
8
7
|
* @param request optional OystehrClientRequest object
|
|
9
8
|
* @returns FHIR Bundle resource
|
|
10
9
|
*/
|
|
11
|
-
function search(params, request) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _a, _b;
|
|
27
|
-
return (_b = (_a = this.entry) === null || _a === void 0 ? void 0 : _a.map((entry) => entry.resource).filter((entry) => entry !== undefined)) !== null && _b !== void 0 ? _b : [];
|
|
28
|
-
} });
|
|
29
|
-
return bundle;
|
|
10
|
+
async function search(params, request) {
|
|
11
|
+
const { resourceType, params: searchParams } = params;
|
|
12
|
+
let paramMap;
|
|
13
|
+
if (searchParams) {
|
|
14
|
+
paramMap = Object.entries(searchParams).reduce((acc, [_, param]) => {
|
|
15
|
+
if (!acc[param.name]) {
|
|
16
|
+
acc[param.name] = [];
|
|
17
|
+
}
|
|
18
|
+
acc[param.name].push(param.value);
|
|
19
|
+
return acc;
|
|
20
|
+
}, {});
|
|
21
|
+
}
|
|
22
|
+
const requestBundle = await this.fhirRequest(`/${resourceType}/_search`, 'POST')(paramMap, {
|
|
23
|
+
...request,
|
|
24
|
+
contentType: 'application/x-www-form-urlencoded',
|
|
30
25
|
});
|
|
26
|
+
const bundle = {
|
|
27
|
+
...requestBundle,
|
|
28
|
+
entry: requestBundle.entry,
|
|
29
|
+
unbundle: function () {
|
|
30
|
+
return this.entry?.map((entry) => entry.resource).filter((entry) => entry !== undefined) ?? [];
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
return bundle;
|
|
31
34
|
}
|
|
32
|
-
function create(params, request) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return this.fhirRequest(`/${resourceType}`, 'POST')(params, request);
|
|
36
|
-
});
|
|
35
|
+
async function create(params, request) {
|
|
36
|
+
const { resourceType } = params;
|
|
37
|
+
return this.fhirRequest(`/${resourceType}`, 'POST')(params, request);
|
|
37
38
|
}
|
|
38
|
-
function get({ resourceType, id }, request) {
|
|
39
|
-
return
|
|
40
|
-
return this.fhirRequest(`/${resourceType}/${id}`, 'GET')({}, request);
|
|
41
|
-
});
|
|
39
|
+
async function get({ resourceType, id }, request) {
|
|
40
|
+
return this.fhirRequest(`/${resourceType}/${id}`, 'GET')({}, request);
|
|
42
41
|
}
|
|
43
|
-
function update(params, request) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
async function update(params, request) {
|
|
43
|
+
const { id, resourceType } = params;
|
|
44
|
+
return this.fhirRequest(`/${resourceType}/${id}`, 'PUT')(params, {
|
|
45
|
+
...request,
|
|
46
|
+
ifMatch: request?.optimisticLockingVersionId ? `W/"${request.optimisticLockingVersionId}"` : undefined,
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function patch({ resourceType, id, operations }, request) {
|
|
50
|
-
return
|
|
51
|
-
|
|
49
|
+
async function patch({ resourceType, id, operations }, request) {
|
|
50
|
+
return this.fhirRequest(`/${resourceType}/${id}`, 'PATCH')(operations, {
|
|
51
|
+
...request,
|
|
52
|
+
contentType: 'application/json-patch+json',
|
|
53
|
+
ifMatch: request?.optimisticLockingVersionId ? `W/"${request.optimisticLockingVersionId}"` : undefined,
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
|
-
function del({ resourceType, id }, request) {
|
|
55
|
-
return
|
|
56
|
-
return this.fhirRequest(`/${resourceType}/${id}`, 'DELETE')({}, request);
|
|
57
|
-
});
|
|
56
|
+
async function del({ resourceType, id }, request) {
|
|
57
|
+
return this.fhirRequest(`/${resourceType}/${id}`, 'DELETE')({}, request);
|
|
58
58
|
}
|
|
59
|
-
function history({ resourceType, id, versionId }, request) {
|
|
60
|
-
return
|
|
61
|
-
return this.fhirRequest(`/${resourceType}/${id}/_history${versionId ? `/${versionId}` : ''}`, 'GET')({}, request);
|
|
62
|
-
});
|
|
59
|
+
async function history({ resourceType, id, versionId }, request) {
|
|
60
|
+
return this.fhirRequest(`/${resourceType}/${id}/_history${versionId ? `/${versionId}` : ''}`, 'GET')({}, request);
|
|
63
61
|
}
|
|
64
62
|
function batchInputRequestToBundleEntryItem(request) {
|
|
65
63
|
const { method, url } = request;
|
|
@@ -99,35 +97,46 @@ function batchInputRequestToBundleEntryItem(request) {
|
|
|
99
97
|
// PUT updates require a full resource
|
|
100
98
|
if (method === 'PUT') {
|
|
101
99
|
const { resource } = request;
|
|
102
|
-
return
|
|
100
|
+
return {
|
|
101
|
+
...baseRequest,
|
|
102
|
+
resource: resource,
|
|
103
|
+
};
|
|
103
104
|
}
|
|
104
105
|
// PATCH can be Binary resource or JSON patch
|
|
105
106
|
if (method === 'PATCH') {
|
|
106
107
|
if ('resource' in request) {
|
|
107
|
-
return
|
|
108
|
+
return {
|
|
109
|
+
...baseRequest,
|
|
110
|
+
resource: request.resource,
|
|
111
|
+
};
|
|
108
112
|
}
|
|
109
|
-
return
|
|
113
|
+
return {
|
|
114
|
+
...baseRequest,
|
|
115
|
+
resource: {
|
|
110
116
|
resourceType: 'Binary',
|
|
111
117
|
contentType: 'application/json-patch+json',
|
|
112
118
|
data: Buffer.from(JSON.stringify(request.operations), 'utf8').toString('base64'),
|
|
113
|
-
}
|
|
119
|
+
},
|
|
120
|
+
};
|
|
114
121
|
}
|
|
115
122
|
// POST creates require a full resource
|
|
116
123
|
if (method === 'POST') {
|
|
117
124
|
const { resource, fullUrl } = request;
|
|
118
|
-
return
|
|
125
|
+
return {
|
|
126
|
+
...baseRequest,
|
|
127
|
+
resource: resource,
|
|
128
|
+
fullUrl,
|
|
129
|
+
};
|
|
119
130
|
}
|
|
120
131
|
throw new Error('Unrecognized method');
|
|
121
132
|
}
|
|
122
133
|
function bundleRequest(type) {
|
|
123
|
-
return function (input, request) {
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}, request);
|
|
130
|
-
});
|
|
134
|
+
return async function (input, request) {
|
|
135
|
+
return this.fhirRequest('/', 'POST')({
|
|
136
|
+
resourceType: 'Bundle',
|
|
137
|
+
type,
|
|
138
|
+
entry: input.requests.map(batchInputRequestToBundleEntryItem),
|
|
139
|
+
}, request);
|
|
131
140
|
};
|
|
132
141
|
}
|
|
133
142
|
const batch = bundleRequest('batch');
|
|
@@ -150,14 +159,14 @@ function formatAddress(address, options) {
|
|
|
150
159
|
}
|
|
151
160
|
builder.push(cityStateZip.join(', '));
|
|
152
161
|
}
|
|
153
|
-
if (address.use && (
|
|
162
|
+
if (address.use && (options?.all || options?.use)) {
|
|
154
163
|
builder.push('[' + address.use + ']');
|
|
155
164
|
}
|
|
156
|
-
return builder.join(
|
|
165
|
+
return builder.join(options?.lineSeparator || ', ').trim();
|
|
157
166
|
}
|
|
158
167
|
function formatHumanName(name, options) {
|
|
159
168
|
const builder = [];
|
|
160
|
-
if (name.prefix &&
|
|
169
|
+
if (name.prefix && options?.prefix !== false) {
|
|
161
170
|
builder.push(...name.prefix);
|
|
162
171
|
}
|
|
163
172
|
if (name.given) {
|
|
@@ -166,10 +175,10 @@ function formatHumanName(name, options) {
|
|
|
166
175
|
if (name.family) {
|
|
167
176
|
builder.push(name.family);
|
|
168
177
|
}
|
|
169
|
-
if (name.suffix &&
|
|
178
|
+
if (name.suffix && options?.suffix !== false) {
|
|
170
179
|
builder.push(...name.suffix);
|
|
171
180
|
}
|
|
172
|
-
if (name.use && (
|
|
181
|
+
if (name.use && (options?.all || options?.use)) {
|
|
173
182
|
builder.push('[' + name.use + ']');
|
|
174
183
|
}
|
|
175
184
|
return builder.join(' ').trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fhir-ext.js","sources":["../../../../src/resources/classes/fhir-ext.ts"],"sourcesContent":["import { Address as AddressR4B, HumanName as HumanNameR4B } from 'fhir/r4b';\nimport { Address as AddressR5, HumanName as HumanNameR5 } from 'fhir/r5';\nimport {\n BatchInput,\n BatchInputRequest,\n Binary,\n Bundle,\n BundleEntry,\n FhirBundle,\n FhirCreateParams,\n FhirDeleteParams,\n FhirGetParams,\n FhirHistoryGetParams,\n FhirHistorySearchParams,\n FhirPatchParams,\n FhirResource,\n FhirSearchParams,\n FhirUpdateParams,\n} from '../..';\nimport { addParamsToSearch, FhirFetcherResponse, OystehrClientRequest, SDKResource } from '../../client/client';\n\n/**\n * Optional parameter that can be passed to the client methods. It allows\n * overriding the access token or project ID, and setting various headers,\n * such as 'Content-Type'. Also support enabling optimistic locking.\n */\nexport interface OystehrFHIRUpdateClientRequest extends OystehrClientRequest {\n /**\n * Enable optimistic locking for the request. If set to a version ID, the request will\n * include the 'If-Match' header with that value in the FHIR optimistic-locking format.\n * If the resource has been updated since the version provided, the request\n * will fail with a 412 Precondition Failed error.\n */\n optimisticLockingVersionId?: string;\n}\n\n/**\n * Performs a FHIR search and returns the results as a Bundle resource\n *\n * @param options FHIR resource type and FHIR search parameters\n * @param request optional OystehrClientRequest object\n * @returns FHIR Bundle resource\n */\nexport async function search<T extends FhirResource>(\n this: SDKResource,\n params: FhirSearchParams,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<Bundle<T>>> {\n const { resourceType, params: searchParams } = params;\n let paramMap: Record<string, (string | number)[]> | undefined;\n if (searchParams) {\n paramMap = Object.entries(searchParams).reduce((acc, [_, param]) => {\n if (!acc[param.name]) {\n acc[param.name] = [];\n }\n acc[param.name].push(param.value);\n return acc;\n }, {} as Record<string, (string | number)[]>);\n }\n const requestBundle = await this.fhirRequest<FhirBundle<T>>(`/${resourceType}/_search`, 'POST')(paramMap, {\n ...request,\n contentType: 'application/x-www-form-urlencoded',\n });\n const bundle: Bundle<T> = {\n ...requestBundle,\n entry: requestBundle.entry as Array<BundleEntry<T>> | undefined,\n unbundle: function (this: { entry?: Array<BundleEntry<T>> | undefined }) {\n return this.entry?.map((entry) => entry.resource).filter((entry): entry is T => entry !== undefined) ?? [];\n },\n };\n return bundle;\n}\n\nexport async function create<T extends FhirResource>(\n this: SDKResource,\n params: FhirCreateParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>> {\n const { resourceType } = params;\n return this.fhirRequest(`/${resourceType}`, 'POST')(params as unknown as Record<string, unknown>, request);\n}\n\nexport async function get<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id }: FhirGetParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>> {\n return this.fhirRequest<T>(`/${resourceType}/${id}`, 'GET')({}, request);\n}\n\nexport async function update<T extends FhirResource>(\n this: SDKResource,\n params: FhirUpdateParams<T>,\n request?: OystehrFHIRUpdateClientRequest\n): Promise<FhirFetcherResponse<T>> {\n const { id, resourceType } = params;\n return this.fhirRequest(`/${resourceType}/${id}`, 'PUT')(params as unknown as Record<string, unknown>, {\n ...request,\n ifMatch: request?.optimisticLockingVersionId ? `W/\"${request.optimisticLockingVersionId}\"` : undefined,\n });\n}\n\nexport async function patch<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id, operations }: FhirPatchParams,\n request?: OystehrFHIRUpdateClientRequest\n): Promise<FhirFetcherResponse<T>> {\n return this.fhirRequest(`/${resourceType}/${id}`, 'PATCH')(operations, {\n ...request,\n contentType: 'application/json-patch+json',\n ifMatch: request?.optimisticLockingVersionId ? `W/\"${request.optimisticLockingVersionId}\"` : undefined,\n });\n}\n\nasync function del<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id }: FhirDeleteParams,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>> {\n return this.fhirRequest(`/${resourceType}/${id}`, 'DELETE')({}, request);\n}\nexport { del as delete };\n\nexport async function history<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id }: FhirHistorySearchParams,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<Bundle<T>>>;\nexport async function history<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id, versionId }: FhirHistoryGetParams,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>>;\nexport async function history<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id, versionId }: { resourceType: string; id: string; versionId?: string },\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<Bundle<T>> | FhirFetcherResponse<T>> {\n return this.fhirRequest(`/${resourceType}/${id}/_history${versionId ? `/${versionId}` : ''}`, 'GET')({}, request);\n}\n\nfunction batchInputRequestToBundleEntryItem<T extends FhirResource>(\n request: BatchInputRequest<T>\n): BundleEntry<T | Binary<T>> {\n const { method, url } = request;\n const baseRequest = {\n request: {\n method,\n url,\n },\n };\n\n // Escape query string parameters in entry.request.url\n if (url.split('?').length > 1) {\n const [resource, query] = url.split('?');\n const params = query\n .split('&')\n .map((param) => {\n const [name, value] = param.split('=');\n return { name, value };\n })\n .reduce((acc, { name, value }) => {\n if (!name) {\n return acc;\n }\n if (!acc[name]) {\n acc[name] = [];\n }\n acc[name].push(value);\n return acc;\n }, {} as Record<string, string[]>);\n const search = new URLSearchParams();\n addParamsToSearch(params, search);\n baseRequest.request.url = `${resource}?${search.toString()}`;\n }\n\n // GET, DELETE, and HEAD require no further parameters\n if (['GET', 'DELETE', 'HEAD'].includes(method)) {\n return baseRequest as BundleEntry<T>;\n }\n\n // PUT updates require a full resource\n if (method === 'PUT') {\n const { resource } = request;\n return {\n ...baseRequest,\n resource: resource as T,\n } as BundleEntry<T>;\n }\n\n // PATCH can be Binary resource or JSON patch\n if (method === 'PATCH') {\n if ('resource' in request) {\n return {\n ...baseRequest,\n resource: request.resource,\n } as BundleEntry<Binary<T>>;\n }\n return {\n ...baseRequest,\n resource: {\n resourceType: 'Binary',\n contentType: 'application/json-patch+json',\n data: Buffer.from(JSON.stringify(request.operations), 'utf8').toString('base64'),\n },\n } as BundleEntry<Binary<T>>;\n }\n\n // POST creates require a full resource\n if (method === 'POST') {\n const { resource, fullUrl } = request;\n return {\n ...baseRequest,\n resource: resource as T,\n fullUrl,\n } as BundleEntry<T>;\n }\n throw new Error('Unrecognized method');\n}\n\nfunction bundleRequest(type: 'batch' | 'transaction') {\n return async function <BundleContentType extends FhirResource>(\n this: SDKResource,\n input: BatchInput<BundleContentType>,\n request?: OystehrClientRequest\n ): Promise<FhirFetcherResponse<Bundle<BundleContentType>>> {\n return this.fhirRequest('/', 'POST')(\n {\n resourceType: 'Bundle',\n type,\n entry: input.requests.map(batchInputRequestToBundleEntryItem),\n },\n request\n );\n };\n}\n\nexport const batch = bundleRequest('batch');\nexport const transaction = bundleRequest('transaction');\n\nexport function formatAddress(\n address: AddressR4B | AddressR5,\n options?: { all?: boolean; use?: boolean; lineSeparator?: string }\n): string {\n const builder = [];\n\n if (address.line) {\n builder.push(...address.line);\n }\n\n if (address.city || address.state || address.postalCode) {\n const cityStateZip = [];\n if (address.city) {\n cityStateZip.push(address.city);\n }\n if (address.state) {\n cityStateZip.push(address.state);\n }\n if (address.postalCode) {\n cityStateZip.push(address.postalCode);\n }\n builder.push(cityStateZip.join(', '));\n }\n\n if (address.use && (options?.all || options?.use)) {\n builder.push('[' + address.use + ']');\n }\n\n return builder.join(options?.lineSeparator || ', ').trim();\n}\n\nexport function formatHumanName(\n name: HumanNameR4B | HumanNameR5,\n options?: {\n all?: boolean;\n prefix?: boolean;\n suffix?: boolean;\n use?: boolean;\n }\n): string {\n const builder = [];\n\n if (name.prefix && options?.prefix !== false) {\n builder.push(...name.prefix);\n }\n\n if (name.given) {\n builder.push(...name.given);\n }\n\n if (name.family) {\n builder.push(name.family);\n }\n\n if (name.suffix && options?.suffix !== false) {\n builder.push(...name.suffix);\n }\n\n if (name.use && (options?.all || options?.use)) {\n builder.push('[' + name.use + ']');\n }\n\n return builder.join(' ').trim();\n}\n"],"names":[],"mappings":";;;AAoCA;;;;;;AAMG;AACmB,SAAA,MAAM,CAE1B,MAAwB,EACxB,OAA8B,EAAA;;QAE9B,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;AACtD,QAAA,IAAI,QAAyD,CAAC;AAC9D,QAA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AI,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,GAAG,CAAA,CAAC,EAAE;QAC9C,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;AACpC,KAAA;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAClC;;;;"}
|
|
1
|
+
{"version":3,"file":"fhir-ext.js","sources":["../../../../src/resources/classes/fhir-ext.ts"],"sourcesContent":["import { Address as AddressR4B, HumanName as HumanNameR4B } from 'fhir/r4b';\nimport { Address as AddressR5, HumanName as HumanNameR5 } from 'fhir/r5';\nimport {\n BatchInput,\n BatchInputRequest,\n Binary,\n Bundle,\n BundleEntry,\n FhirBundle,\n FhirCreateParams,\n FhirDeleteParams,\n FhirGetParams,\n FhirHistoryGetParams,\n FhirHistorySearchParams,\n FhirPatchParams,\n FhirResource,\n FhirSearchParams,\n FhirUpdateParams,\n} from '../..';\nimport { addParamsToSearch, FhirFetcherResponse, OystehrClientRequest, SDKResource } from '../../client/client';\n\n/**\n * Optional parameter that can be passed to the client methods. It allows\n * overriding the access token or project ID, and setting various headers,\n * such as 'Content-Type'. Also support enabling optimistic locking.\n */\nexport interface OystehrFHIRUpdateClientRequest extends OystehrClientRequest {\n /**\n * Enable optimistic locking for the request. If set to a version ID, the request will\n * include the 'If-Match' header with that value in the FHIR optimistic-locking format.\n * If the resource has been updated since the version provided, the request\n * will fail with a 412 Precondition Failed error.\n */\n optimisticLockingVersionId?: string;\n}\n\n/**\n * Performs a FHIR search and returns the results as a Bundle resource\n *\n * @param options FHIR resource type and FHIR search parameters\n * @param request optional OystehrClientRequest object\n * @returns FHIR Bundle resource\n */\nexport async function search<T extends FhirResource>(\n this: SDKResource,\n params: FhirSearchParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<Bundle<T>>> {\n const { resourceType, params: searchParams } = params;\n let paramMap: Record<string, (string | number)[]> | undefined;\n if (searchParams) {\n paramMap = Object.entries(searchParams).reduce((acc, [_, param]) => {\n if (!acc[param.name]) {\n acc[param.name] = [];\n }\n acc[param.name].push(param.value);\n return acc;\n }, {} as Record<string, (string | number)[]>);\n }\n const requestBundle = await this.fhirRequest<FhirBundle<T>>(`/${resourceType}/_search`, 'POST')(paramMap, {\n ...request,\n contentType: 'application/x-www-form-urlencoded',\n });\n const bundle: Bundle<T> = {\n ...requestBundle,\n entry: requestBundle.entry as Array<BundleEntry<T>> | undefined,\n unbundle: function (this: { entry?: Array<BundleEntry<T>> | undefined }) {\n return this.entry?.map((entry) => entry.resource).filter((entry): entry is T => entry !== undefined) ?? [];\n },\n };\n return bundle;\n}\n\nexport async function create<T extends FhirResource>(\n this: SDKResource,\n params: FhirCreateParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>> {\n const { resourceType } = params;\n return this.fhirRequest(`/${resourceType}`, 'POST')(params as unknown as Record<string, unknown>, request);\n}\n\nexport async function get<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id }: FhirGetParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>> {\n return this.fhirRequest<T>(`/${resourceType}/${id}`, 'GET')({}, request);\n}\n\nexport async function update<T extends FhirResource>(\n this: SDKResource,\n params: FhirUpdateParams<T>,\n request?: OystehrFHIRUpdateClientRequest\n): Promise<FhirFetcherResponse<T>> {\n const { id, resourceType } = params;\n return this.fhirRequest(`/${resourceType}/${id}`, 'PUT')(params as unknown as Record<string, unknown>, {\n ...request,\n ifMatch: request?.optimisticLockingVersionId ? `W/\"${request.optimisticLockingVersionId}\"` : undefined,\n });\n}\n\nexport async function patch<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id, operations }: FhirPatchParams<T>,\n request?: OystehrFHIRUpdateClientRequest\n): Promise<FhirFetcherResponse<T>> {\n return this.fhirRequest(`/${resourceType}/${id}`, 'PATCH')(operations, {\n ...request,\n contentType: 'application/json-patch+json',\n ifMatch: request?.optimisticLockingVersionId ? `W/\"${request.optimisticLockingVersionId}\"` : undefined,\n });\n}\n\nasync function del<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id }: FhirDeleteParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>> {\n return this.fhirRequest(`/${resourceType}/${id}`, 'DELETE')({}, request);\n}\nexport { del as delete };\n\nexport async function history<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id }: FhirHistorySearchParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<Bundle<T>>>;\nexport async function history<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id, versionId }: FhirHistoryGetParams<T>,\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<T>>;\nexport async function history<T extends FhirResource>(\n this: SDKResource,\n { resourceType, id, versionId }: { resourceType: string; id: string; versionId?: string },\n request?: OystehrClientRequest\n): Promise<FhirFetcherResponse<Bundle<T>> | FhirFetcherResponse<T>> {\n return this.fhirRequest(`/${resourceType}/${id}/_history${versionId ? `/${versionId}` : ''}`, 'GET')({}, request);\n}\n\nfunction batchInputRequestToBundleEntryItem<T extends FhirResource>(\n request: BatchInputRequest<T>\n): BundleEntry<T | Binary<T>> {\n const { method, url } = request;\n const baseRequest = {\n request: {\n method,\n url,\n },\n };\n\n // Escape query string parameters in entry.request.url\n if (url.split('?').length > 1) {\n const [resource, query] = url.split('?');\n const params = query\n .split('&')\n .map((param) => {\n const [name, value] = param.split('=');\n return { name, value };\n })\n .reduce((acc, { name, value }) => {\n if (!name) {\n return acc;\n }\n if (!acc[name]) {\n acc[name] = [];\n }\n acc[name].push(value);\n return acc;\n }, {} as Record<string, string[]>);\n const search = new URLSearchParams();\n addParamsToSearch(params, search);\n baseRequest.request.url = `${resource}?${search.toString()}`;\n }\n\n // GET, DELETE, and HEAD require no further parameters\n if (['GET', 'DELETE', 'HEAD'].includes(method)) {\n return baseRequest as BundleEntry<T>;\n }\n\n // PUT updates require a full resource\n if (method === 'PUT') {\n const { resource } = request;\n return {\n ...baseRequest,\n resource: resource as T,\n } as BundleEntry<T>;\n }\n\n // PATCH can be Binary resource or JSON patch\n if (method === 'PATCH') {\n if ('resource' in request) {\n return {\n ...baseRequest,\n resource: request.resource,\n } as BundleEntry<Binary<T>>;\n }\n return {\n ...baseRequest,\n resource: {\n resourceType: 'Binary',\n contentType: 'application/json-patch+json',\n data: Buffer.from(JSON.stringify(request.operations), 'utf8').toString('base64'),\n },\n } as BundleEntry<Binary<T>>;\n }\n\n // POST creates require a full resource\n if (method === 'POST') {\n const { resource, fullUrl } = request;\n return {\n ...baseRequest,\n resource: resource as T,\n fullUrl,\n } as BundleEntry<T>;\n }\n throw new Error('Unrecognized method');\n}\n\nfunction bundleRequest(type: 'batch' | 'transaction') {\n return async function <BundleContentType extends FhirResource>(\n this: SDKResource,\n input: BatchInput<BundleContentType>,\n request?: OystehrClientRequest\n ): Promise<FhirFetcherResponse<Bundle<BundleContentType>>> {\n return this.fhirRequest('/', 'POST')(\n {\n resourceType: 'Bundle',\n type,\n entry: input.requests.map(batchInputRequestToBundleEntryItem),\n },\n request\n );\n };\n}\n\nexport const batch = bundleRequest('batch');\nexport const transaction = bundleRequest('transaction');\n\nexport function formatAddress(\n address: AddressR4B | AddressR5,\n options?: { all?: boolean; use?: boolean; lineSeparator?: string }\n): string {\n const builder = [];\n\n if (address.line) {\n builder.push(...address.line);\n }\n\n if (address.city || address.state || address.postalCode) {\n const cityStateZip = [];\n if (address.city) {\n cityStateZip.push(address.city);\n }\n if (address.state) {\n cityStateZip.push(address.state);\n }\n if (address.postalCode) {\n cityStateZip.push(address.postalCode);\n }\n builder.push(cityStateZip.join(', '));\n }\n\n if (address.use && (options?.all || options?.use)) {\n builder.push('[' + address.use + ']');\n }\n\n return builder.join(options?.lineSeparator || ', ').trim();\n}\n\nexport function formatHumanName(\n name: HumanNameR4B | HumanNameR5,\n options?: {\n all?: boolean;\n prefix?: boolean;\n suffix?: boolean;\n use?: boolean;\n }\n): string {\n const builder = [];\n\n if (name.prefix && options?.prefix !== false) {\n builder.push(...name.prefix);\n }\n\n if (name.given) {\n builder.push(...name.given);\n }\n\n if (name.family) {\n builder.push(name.family);\n }\n\n if (name.suffix && options?.suffix !== false) {\n builder.push(...name.suffix);\n }\n\n if (name.use && (options?.all || options?.use)) {\n builder.push('[' + name.use + ']');\n }\n\n return builder.join(' ').trim();\n}\n"],"names":[],"mappings":";;AAoCA;;;;;;AAMG;AACI,eAAe,MAAM,CAE1B,MAA2B,EAC3B,OAA8B,EAAA;IAE9B,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;AACtD,IAAA,IAAI,QAAyD,CAAC;IAC9D,IAAI,YAAY,EAAE;AAChB,QAAA,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,KAAI;YACjE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;AACpB,gBAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;aACtB;AACD,YAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClC,YAAA,OAAO,GAAG,CAAC;SACZ,EAAE,EAAyC,CAAC,CAAC;KAC/C;AACD,IAAA,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,WAAW,CAAgB,CAAI,CAAA,EAAA,YAAY,UAAU,EAAE,MAAM,CAAC,CAAC,QAAQ,EAAE;AACxG,QAAA,GAAG,OAAO;AACV,QAAA,WAAW,EAAE,mCAAmC;AACjD,KAAA,CAAC,CAAC;AACH,IAAA,MAAM,MAAM,GAAc;AACxB,QAAA,GAAG,aAAa;QAChB,KAAK,EAAE,aAAa,CAAC,KAA0C;A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CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;KAC9B;AAED,IAAA,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;KAC7B;AAED,IAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,QAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC3B;IAED,IAAI,IAAI,CAAC,MAAM,IAAI,OAAO,EAAE,MAAM,KAAK,KAAK,EAAE;QAC5C,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;KAC9B;AAED,IAAA,IAAI,IAAI,CAAC,GAAG,KAAK,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,GAAG,CAAC,EAAE;QAC9C,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;KACpC;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAClC;;;;"}
|
|
@@ -17,8 +17,8 @@ export declare class Fhir extends SDKResource {
|
|
|
17
17
|
patch: typeof ext.patch;
|
|
18
18
|
delete: typeof ext.delete;
|
|
19
19
|
history: typeof ext.history;
|
|
20
|
-
batch: <BundleContentType extends import("..").FhirResource>(this: SDKResource, input: import("..").BatchInput<BundleContentType>, request?: import("
|
|
21
|
-
transaction: <BundleContentType extends import("..").FhirResource>(this: SDKResource, input: import("..").BatchInput<BundleContentType>, request?: import("
|
|
20
|
+
batch: <BundleContentType extends import("..").FhirResource>(this: SDKResource, input: import("..").BatchInput<BundleContentType>, request?: import("../..").OystehrClientRequest) => Promise<import("../../client/client").FhirFetcherResponse<import("..").Bundle<BundleContentType>>>;
|
|
21
|
+
transaction: <BundleContentType extends import("..").FhirResource>(this: SDKResource, input: import("..").BatchInput<BundleContentType>, request?: import("../..").OystehrClientRequest) => Promise<import("../../client/client").FhirFetcherResponse<import("..").Bundle<BundleContentType>>>;
|
|
22
22
|
formatAddress: typeof ext.formatAddress;
|
|
23
23
|
formatHumanName: typeof ext.formatHumanName;
|
|
24
24
|
}
|