diff --git a/icc-api/api/IccBekmehrApi.ts b/icc-api/api/IccBekmehrApi.ts index 868335d5..31af0dcc 100644 --- a/icc-api/api/IccBekmehrApi.ts +++ b/icc-api/api/IccBekmehrApi.ts @@ -15,6 +15,7 @@ import { Content } from '../model/Content' import { DiaryNoteExportInfo } from '../model/DiaryNoteExportInfo' import { ImportMapping } from '../model/ImportMapping' import { ImportResult } from '../model/ImportResult' +import { IncapacityExportInfo } from '../model/IncapacityExportInfo'; import { MedicationSchemeExportInfo } from '../model/MedicationSchemeExportInfo' import { SoftwareMedicalFileExport } from '../model/SoftwareMedicalFileExport' import { SumehrContent } from '../model/SumehrContent' @@ -228,6 +229,28 @@ export class IccBekmehrApi { .catch((err) => this.handleError(err)) } + /** + * + * @summary Get Incapacity export + * @param body + * @param patientId + * @param language + * @param xTimezoneOffset + */ + generateIncapacityExport(patientId: string, language: string, xTimezoneOffset?: string, body?: IncapacityExportInfo): Promise { + let _body = null + _body = body + + const _url = this.host + `/be_kmehr/incapacity/${encodeURIComponent(String(patientId))}/export` + "?ts=" + new Date().getTime() + (language ? "&language=" + encodeURIComponent(String(language)) : "") + let headers = this.headers + headers = headers.filter(h => h.header !== "Content-Type").concat(new XHR.Header("Content-Type", "application/json")) + xTimezoneOffset && (headers = headers.concat(new XHR.Header("X-Timezone-Offset", xTimezoneOffset))) + return XHR.sendCommand("POST", _url, headers, _body, this.fetchImpl) + .then(doc => + doc.body ) + .catch(err => this.handleError(err)) + } + /** * * @summary Get Kmehr note diff --git a/icc-api/model/IncapacityExportInfo.ts b/icc-api/model/IncapacityExportInfo.ts new file mode 100644 index 00000000..202c25d1 --- /dev/null +++ b/icc-api/model/IncapacityExportInfo.ts @@ -0,0 +1,29 @@ +/** + * iCure Data Stack API Documentation + * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2. + * + * OpenAPI spec version: v1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { HealthcareParty } from './HealthcareParty'; +import { Service } from './Service'; + +export class IncapacityExportInfo { + constructor(json: JSON | any) { + Object.assign(this as IncapacityExportInfo, json) + } + + secretForeignKeys?: Array; + services?: Array; + serviceAuthors?: Array; + recipient?: HealthcareParty; + comment?: string; + incapacityId?: string; + retraction?: boolean; + dataset?: string; +} + diff --git a/icc-api/model/models.ts b/icc-api/model/models.ts index 815a7aca..d25b4e65 100644 --- a/icc-api/model/models.ts +++ b/icc-api/model/models.ts @@ -103,6 +103,7 @@ export * from './Identifier' export * from './IdentityDocumentReader' export * from './ImportMapping' export * from './ImportResult' +export * from './IncapacityExportInfo' export * from './IndexedIdentifier' export * from './IndexingInfo' export * from './Ingredient'