@icure/api 4.2.0 → 4.2.3
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/icc-api/model/HealthcareParty.d.ts +6 -0
- package/icc-api/model/HealthcareParty.js.map +1 -1
- package/icc-x-api/filters/UserByNameEmailPhoneFilter.d.ts +1 -1
- package/icc-x-api/filters/UserByNameEmailPhoneFilter.js +4 -4
- package/icc-x-api/filters/UserByNameEmailPhoneFilter.js.map +1 -1
- package/icc-x-api/index.d.ts +2 -1
- package/icc-x-api/index.js +2 -0
- package/icc-x-api/index.js.map +1 -1
- package/package.json +1 -1
- package/icc-api/api/IccHealthElementApi.d.ts +0 -95
- package/icc-api/api/IccHealthElementApi.js +0 -205
- package/icc-api/api/IccHealthElementApi.js.map +0 -1
- package/icc-api/api/IccHealthcarePartyApi.d.ts +0 -146
- package/icc-api/api/IccHealthcarePartyApi.js +0 -312
- package/icc-api/api/IccHealthcarePartyApi.js.map +0 -1
|
@@ -148,6 +148,12 @@ export declare class HealthcareParty {
|
|
|
148
148
|
* List of financial information (Bank, bank account).
|
|
149
149
|
*/
|
|
150
150
|
financialInstitutionInformation?: Array<FinancialInstitutionInformation>;
|
|
151
|
+
/**
|
|
152
|
+
* A description of the HCP, meant for the public and in multiple languages.
|
|
153
|
+
*/
|
|
154
|
+
descr?: {
|
|
155
|
+
[key: string]: string;
|
|
156
|
+
};
|
|
151
157
|
/**
|
|
152
158
|
* The invoicing scheme this healthcare party adheres to : 'service fee' or 'flat rate'
|
|
153
159
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HealthcareParty.js","sourceRoot":"","sources":["../../../icc-api/model/HealthcareParty.ts"],"names":[],"mappings":";;;AAmBA;;GAEG;AACH,+CAAuC;AACvC,MAAa,eAAe;IAC1B,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAuB,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,qBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACtG,CAAC;
|
|
1
|
+
{"version":3,"file":"HealthcareParty.js","sourceRoot":"","sources":["../../../icc-api/model/HealthcareParty.ts"],"names":[],"mappings":";;;AAmBA;;GAEG;AACH,+CAAuC;AACvC,MAAa,eAAe;IAC1B,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAuB,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,qBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACtG,CAAC;CA0KF;AA7KD,0CA6KC;AACD,WAAiB,eAAe;IAEjB,0BAAU,GAAG;QACxB,IAAI,EAAE,MAAoB;QAC1B,MAAM,EAAE,QAAsB;QAC9B,aAAa,EAAE,eAA6B;QAC5C,OAAO,EAAE,SAAuB;QAChC,aAAa,EAAE,eAA6B;QAC5C,eAAe,EAAE,iBAA+B;QAChD,OAAO,EAAE,SAAuB;KACjC,CAAA;IAEY,4BAAY,GAAG;QAC1B,OAAO,EAAE,SAAyB;QAClC,cAAc,EAAE,gBAAgC;QAChD,YAAY,EAAE,cAA8B;KAC7C,CAAA;AACH,CAAC,EAjBgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAiB/B","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { Address } from './Address'\nimport { CodeStub } from './CodeStub'\nimport { FinancialInstitutionInformation } from './FinancialInstitutionInformation'\nimport { FlatRateTarification } from './FlatRateTarification'\nimport { HealthcarePartyHistoryStatus } from './HealthcarePartyHistoryStatus'\nimport { PersonName } from './PersonName'\nimport { PropertyStub } from './PropertyStub'\n\n/**\n * This entity is a root level object. It represents a healthcare party. It is serialized in JSON and saved in the underlying icure-healthdata CouchDB database.\n */\nimport { b64_2ab } from './ModelHelper'\nexport class HealthcareParty {\n constructor(json: JSON | any) {\n Object.assign(this as HealthcareParty, json, json.picture ? { picture: b64_2ab(json.picture) } : {})\n }\n\n /**\n * the Id of the healthcare party. We encourage using either a v4 UUID or a HL7 Id.\n */\n id?: string\n /**\n * the revision of the healthcare party in the database, used for conflict management / optimistic locking.\n */\n rev?: string\n /**\n * creation timestamp of the object.\n */\n created?: number\n /**\n * last modification timestamp of the object.\n */\n modified?: number\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n /**\n * The full name of the healthcare party, used mainly when the healthcare party is an organization\n */\n name?: string\n /**\n * the lastname (surname) of the healthcare party. This is the official lastname that should be used for official administrative purposes.\n */\n lastName?: string\n /**\n * the firstname (name) of the healthcare party.\n */\n firstName?: string\n /**\n * the list of all names of the healthcare party, also containing the official full name information. Ordered by preference of use. First element is therefore the official name used for the healthcare party in the application\n */\n names?: Array<PersonName>\n /**\n * the gender of the healthcare party: male, female, indeterminate, changed, changedToMale, changedToFemale, unknown\n */\n gender?: HealthcareParty.GenderEnum\n /**\n * Mr., Ms., Pr., Dr. ...\n */\n civility?: string\n /**\n * The name of the company this healthcare party is member of\n */\n companyName?: string\n /**\n * Medical specialty of the healthcare party\n */\n speciality?: string\n /**\n * Bank Account identifier of the healhtcare party, IBAN, deprecated, use financial institutions instead\n */\n bankAccount?: string\n /**\n * Bank Identifier Code, the SWIFT Address assigned to the bank, use financial institutions instead\n */\n bic?: string\n proxyBankAccount?: string\n proxyBic?: string\n /**\n * All details included in the invoice header\n */\n invoiceHeader?: string\n /**\n * Identifier number for institution type if the healthcare party is an enterprise\n */\n cbe?: string\n /**\n * Identifier number for the institution if the healthcare party is an organization\n */\n ehp?: string\n /**\n * The id of the user that usually handles this healthcare party.\n */\n userId?: string\n /**\n * Id of parent of the user representing the healthcare party.\n */\n parentId?: string\n convention?: number\n /**\n * National Institute for Health and Invalidity Insurance number assigned to healthcare parties (institution or person).\n */\n nihii?: string\n nihiiSpecCode?: string\n /**\n * Social security inscription number.\n */\n ssin?: string\n /**\n * The list of addresses (with address type).\n */\n addresses?: Array<Address>\n /**\n * The list of languages spoken by the patient ordered by fluency (alpha-2 code http://www.loc.gov/standards/iso639-2/ascii_8bits.html).\n */\n languages?: Array<string>\n /**\n * A picture usually saved in JPEG format.\n */\n picture?: ArrayBuffer\n /**\n * The healthcare party's status: 'trainee' or 'withconvention' or 'accredited'\n */\n statuses?: Array<HealthcareParty.StatusesEnum>\n /**\n * The healthcare party's status history\n */\n statusHistory?: Array<HealthcarePartyHistoryStatus>\n /**\n * Medical specialty of the healthcare party codified using FHIR or Kmehr codificaiton scheme\n */\n specialityCodes?: Array<CodeStub>\n /**\n * The type of format for contacting the healthcare party, ex: mobile, phone, email, etc.\n */\n sendFormats?: { [key: string]: string }\n /**\n * Text notes.\n */\n notes?: string\n /**\n * List of financial information (Bank, bank account).\n */\n financialInstitutionInformation?: Array<FinancialInstitutionInformation>\n /**\n * A description of the HCP, meant for the public and in multiple languages.\n */\n descr?: { [key: string]: string }\n /**\n * The invoicing scheme this healthcare party adheres to : 'service fee' or 'flat rate'\n */\n billingType?: string\n type?: string\n contactPerson?: string\n contactPersonHcpId?: string\n supervisorId?: string\n flatRateTarifications?: Array<FlatRateTarification>\n importedData?: { [key: string]: string }\n options?: { [key: string]: string }\n properties?: Array<PropertyStub>\n /**\n * For each couple of HcParties (delegator and delegate), this map contains the exchange AES key. The delegator is always this hcp, the key of the map is the id of the delegate. The AES exchange key is encrypted using RSA twice : once using this hcp public key (index 0 in the Array) and once using the other hcp public key (index 1 in the Array). For a pair of HcParties. Each HcParty always has one AES exchange key for himself.\n */\n hcPartyKeys?: { [key: string]: Array<string> }\n /**\n * Extra AES exchange keys, usually the ones we lost access to at some point. The structure is { publicKey: { delegateId: [aesExKey_for_this, aesExKey_for_delegate] } }\n */\n aesExchangeKeys?: { [key: string]: { [key: string]: Array<string> } }\n /**\n * Our private keys encrypted with our public keys. The structure is { publicKey1: { publicKey2: privateKey2_encrypted_with_publicKey1, publicKey3: privateKey3_encrypted_with_publicKey1 } }\n */\n transferKeys?: { [key: string]: { [key: string]: string } }\n /**\n * The hcparty keys (first of the pair) for which we are asking a re-encryption by the delegate using our new publicKey.\n */\n lostHcPartyKeys?: Array<string>\n /**\n * The privateKeyShamirPartitions are used to share this hcp's private RSA key with a series of other hcParties using Shamir's algorithm. The key of the map is the hcp Id with whom this partition has been shared. The value is \\\"threshold⎮partition in hex\\\" encrypted using the the partition's holder's public RSA key\n */\n privateKeyShamirPartitions?: { [key: string]: string }\n /**\n * The public key of this hcp\n */\n publicKey?: string\n}\nexport namespace HealthcareParty {\n export type GenderEnum = 'male' | 'female' | 'indeterminate' | 'changed' | 'changedToMale' | 'changedToFemale' | 'unknown'\n export const GenderEnum = {\n Male: 'male' as GenderEnum,\n Female: 'female' as GenderEnum,\n Indeterminate: 'indeterminate' as GenderEnum,\n Changed: 'changed' as GenderEnum,\n ChangedToMale: 'changedToMale' as GenderEnum,\n ChangedToFemale: 'changedToFemale' as GenderEnum,\n Unknown: 'unknown' as GenderEnum,\n }\n export type StatusesEnum = 'trainee' | 'withconvention' | 'accreditated'\n export const StatusesEnum = {\n Trainee: 'trainee' as StatusesEnum,\n Withconvention: 'withconvention' as StatusesEnum,\n Accreditated: 'accreditated' as StatusesEnum,\n }\n}\n"]}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { AbstractFilterUser } from '../../icc-api/model/AbstractFilterUser';
|
|
13
|
-
export declare class
|
|
13
|
+
export declare class UserByNameEmailPhoneFilter extends AbstractFilterUser {
|
|
14
14
|
$type: string;
|
|
15
15
|
constructor(json: JSON | any);
|
|
16
16
|
searchString: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UserByNameEmailPhoneFilter = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* iCure Data Stack API Documentation
|
|
6
6
|
* The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
|
|
@@ -13,13 +13,13 @@ exports.UserByNameEmailPhoneilter = void 0;
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
const AbstractFilterUser_1 = require("../../icc-api/model/AbstractFilterUser");
|
|
16
|
-
class
|
|
16
|
+
class UserByNameEmailPhoneFilter extends AbstractFilterUser_1.AbstractFilterUser {
|
|
17
17
|
constructor(json) {
|
|
18
18
|
super(json);
|
|
19
|
-
this.$type = '
|
|
19
|
+
this.$type = 'UserByNameEmailPhoneFilter';
|
|
20
20
|
this.searchString = '';
|
|
21
21
|
Object.assign(this, json);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
exports.
|
|
24
|
+
exports.UserByNameEmailPhoneFilter = UserByNameEmailPhoneFilter;
|
|
25
25
|
//# sourceMappingURL=UserByNameEmailPhoneFilter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserByNameEmailPhoneFilter.js","sourceRoot":"","sources":["../../../icc-x-api/filters/UserByNameEmailPhoneFilter.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,+EAA2E;AAE3E,MAAa,
|
|
1
|
+
{"version":3,"file":"UserByNameEmailPhoneFilter.js","sourceRoot":"","sources":["../../../icc-x-api/filters/UserByNameEmailPhoneFilter.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,+EAA2E;AAE3E,MAAa,0BAA2B,SAAQ,uCAAkB;IAEhE,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,CAAC,CAAA;QAFb,UAAK,GAAW,4BAA4B,CAAA;QAO5C,iBAAY,GAAW,EAAE,CAAA;QAHvB,MAAM,CAAC,MAAM,CAAC,IAAkC,EAAE,IAAI,CAAC,CAAA;IACzD,CAAC;CAIF;AAVD,gEAUC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { AbstractFilterUser } from '../../icc-api/model/AbstractFilterUser'\n\nexport class UserByNameEmailPhoneFilter extends AbstractFilterUser {\n $type: string = 'UserByNameEmailPhoneFilter'\n constructor(json: JSON | any) {\n super(json)\n\n Object.assign(this as UserByNameEmailPhoneFilter, json)\n }\n\n searchString: string = ''\n desc?: string\n}\n"]}
|
package/icc-x-api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IccAgendaApi, IccAuthApi, IccEntityrefApi, IccGroupApi, IccInsuranceApi } from '../icc-api';
|
|
1
|
+
import { IccAgendaApi, IccAuthApi, IccEntityrefApi, IccGroupApi, IccInsuranceApi, IccPermissionApi } from '../icc-api';
|
|
2
2
|
import { IccUserXApi } from './icc-user-x-api';
|
|
3
3
|
import { IccCryptoXApi } from './icc-crypto-x-api';
|
|
4
4
|
import { IccContactXApi } from './icc-contact-x-api';
|
|
@@ -44,6 +44,7 @@ export declare const Api: (host: string, username: string, password: string, cry
|
|
|
44
44
|
authApi: IccAuthApi;
|
|
45
45
|
codeApi: IccCodeXApi;
|
|
46
46
|
userApi: IccUserXApi;
|
|
47
|
+
permissionApi: IccPermissionApi;
|
|
47
48
|
patientApi: IccPatientXApi;
|
|
48
49
|
healthcarePartyApi: IccHcpartyXApi;
|
|
49
50
|
deviceApi: IccDeviceApi;
|
package/icc-x-api/index.js
CHANGED
|
@@ -67,6 +67,7 @@ const Api = function (host, username, password, crypto = typeof window !== 'unde
|
|
|
67
67
|
const codeApi = new icc_code_x_api_1.IccCodeXApi(host, headers, fetchImpl);
|
|
68
68
|
const entityReferenceApi = new icc_api_1.IccEntityrefApi(host, headers, fetchImpl);
|
|
69
69
|
const userApi = new icc_user_x_api_1.IccUserXApi(host, headers, fetchImpl);
|
|
70
|
+
const permissionApi = new icc_api_1.IccPermissionApi(host, headers, fetchImpl);
|
|
70
71
|
const healthcarePartyApi = new icc_hcparty_x_api_1.IccHcpartyXApi(host, headers, fetchImpl);
|
|
71
72
|
const deviceApi = new IccDeviceApi_1.IccDeviceApi(host, headers, fetchImpl);
|
|
72
73
|
const cryptoApi = new icc_crypto_x_api_1.IccCryptoXApi(host, headers, healthcarePartyApi, new icc_api_1.IccPatientApi(host, headers, fetchImpl), deviceApi, crypto);
|
|
@@ -90,6 +91,7 @@ const Api = function (host, username, password, crypto = typeof window !== 'unde
|
|
|
90
91
|
authApi,
|
|
91
92
|
codeApi,
|
|
92
93
|
userApi,
|
|
94
|
+
permissionApi,
|
|
93
95
|
patientApi,
|
|
94
96
|
healthcarePartyApi,
|
|
95
97
|
deviceApi,
|
package/icc-x-api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-x-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-x-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wCAAqI;AACrI,qDAA8C;AAC9C,yDAAkD;AAClD,2DAAoD;AACpD,2DAAoD;AACpD,6DAAsD;AACtD,2DAAoD;AACpD,qDAA8C;AAC9C,6DAAsD;AACtD,yEAAkE;AAClE,uEAA+D;AAC/D,2DAAoD;AACpD,2DAAoD;AACpD,2DAAoD;AACpD,+DAAwD;AACxD,iEAAyD;AACzD,8DAA0D;AAC1D,qDAA8C;AAE9C,wDAAqC;AACrC,sDAA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P,OAAO;QACP,OAAO;QACP,aAAa;QACb,UAAU;QACV,kBAAkB;QAClB,SAAS;QACT,YAAY;QACZ,UAAU;QACV,oBAAoB;QACpB,WAAW;QACX,OAAO;QACP,UAAU;QACV,YAAY;QACZ,UAAU;QACV,kBAAkB;QAClB,UAAU;QACV,SAAS;QACT,eAAe;QACf,iBAAiB;QACjB,YAAY;QACZ,QAAQ;KACT,CAAA;AACH,CAAC,CAAA;AA5EY,QAAA,GAAG,OA4Ef","sourcesContent":["import { IccAgendaApi, IccAuthApi, IccEntityrefApi, IccGroupApi, IccInsuranceApi, IccPatientApi, IccPermissionApi } from '../icc-api'\nimport { IccUserXApi } from './icc-user-x-api'\nimport { IccCryptoXApi } from './icc-crypto-x-api'\nimport { IccContactXApi } from './icc-contact-x-api'\nimport { IccInvoiceXApi } from './icc-invoice-x-api'\nimport { IccDocumentXApi } from './icc-document-x-api'\nimport { IccHcpartyXApi } from './icc-hcparty-x-api'\nimport { IccFormXApi } from './icc-form-x-api'\nimport { IccHelementXApi } from './icc-helement-x-api'\nimport { IccClassificationXApi } from './icc-classification-x-api'\nimport { IccCalendarItemXApi } from './icc-calendar-item-x-api'\nimport { IccPatientXApi } from './icc-patient-x-api'\nimport { IccMessageXApi } from './icc-message-x-api'\nimport { IccReceiptXApi } from './icc-receipt-x-api'\nimport { IccAccesslogXApi } from './icc-accesslog-x-api'\nimport { IccTimeTableXApi } from './icc-time-table-x-api'\nimport { IccDeviceApi } from '../icc-api/api/IccDeviceApi'\nimport { IccCodeXApi } from './icc-code-x-api'\n\nexport * from './icc-accesslog-x-api'\nexport * from './icc-bekmehr-x-api'\nexport * from './icc-calendar-item-x-api'\nexport * from './icc-classification-x-api'\nexport * from './icc-code-x-api'\nexport * from './icc-contact-x-api'\nexport * from './icc-crypto-x-api'\nexport * from './icc-doctemplate-x-api'\nexport * from './icc-document-x-api'\nexport * from './icc-form-x-api'\nexport * from './icc-hcparty-x-api'\nexport * from './icc-helement-x-api'\nexport * from './icc-invoice-x-api'\nexport * from './icc-message-x-api'\nexport * from './icc-patient-x-api'\nexport * from './icc-user-x-api'\nexport * from './icc-time-table-x-api'\nexport * from './icc-receipt-x-api'\nexport { utils, UtilsClass } from './crypto/utils'\nexport * from './utils'\n\nexport const apiHeaders = function (username: string, password: string) {\n return {\n Authorization: `Basic ${\n typeof btoa !== 'undefined' ? btoa(`${username}:${password}`) : Buffer.from(`${username}:${password}`).toString('base64')\n }`,\n }\n}\n\nexport const Api = function (\n host: string,\n username: string,\n password: string,\n crypto: Crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : ({} as Crypto),\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response> = typeof window !== 'undefined'\n ? window.fetch\n : typeof self !== 'undefined'\n ? self.fetch\n : fetch\n) {\n const headers = apiHeaders(username, password)\n const authApi = new IccAuthApi(host, headers, fetchImpl)\n const codeApi = new IccCodeXApi(host, headers, fetchImpl)\n const entityReferenceApi = new IccEntityrefApi(host, headers, fetchImpl)\n const userApi = new IccUserXApi(host, headers, fetchImpl)\n const permissionApi = new IccPermissionApi(host, headers, fetchImpl)\n const healthcarePartyApi = new IccHcpartyXApi(host, headers, fetchImpl)\n const deviceApi = new IccDeviceApi(host, headers, fetchImpl)\n const cryptoApi = new IccCryptoXApi(host, headers, healthcarePartyApi, new IccPatientApi(host, headers, fetchImpl), deviceApi, crypto)\n const accessLogApi = new IccAccesslogXApi(host, headers, cryptoApi, userApi, fetchImpl)\n const agendaApi = new IccAgendaApi(host, headers, fetchImpl)\n const contactApi = new IccContactXApi(host, headers, cryptoApi, userApi, fetchImpl)\n const formApi = new IccFormXApi(host, headers, cryptoApi, userApi, fetchImpl)\n const groupApi = new IccGroupApi(host, headers)\n const invoiceApi = new IccInvoiceXApi(host, headers, cryptoApi, entityReferenceApi, userApi, fetchImpl)\n const insuranceApi = new IccInsuranceApi(host, headers, fetchImpl)\n const documentApi = new IccDocumentXApi(host, headers, cryptoApi, authApi, userApi, fetchImpl)\n const healthcareElementApi = new IccHelementXApi(host, headers, cryptoApi, userApi, [], fetchImpl)\n const classificationApi = new IccClassificationXApi(host, headers, cryptoApi, userApi, fetchImpl)\n const calendarItemApi = new IccCalendarItemXApi(host, headers, cryptoApi, userApi, fetchImpl)\n const receiptApi = new IccReceiptXApi(host, headers, cryptoApi, userApi, fetchImpl)\n const timetableApi = new IccTimeTableXApi(host, headers, cryptoApi, userApi, fetchImpl)\n const patientApi = new IccPatientXApi(\n host,\n headers,\n cryptoApi,\n contactApi,\n formApi,\n healthcareElementApi,\n invoiceApi,\n documentApi,\n healthcarePartyApi,\n classificationApi,\n userApi,\n calendarItemApi,\n ['note'],\n fetchImpl\n )\n const messageApi = new IccMessageXApi(host, headers, cryptoApi, userApi, fetchImpl)\n\n return {\n cryptoApi,\n authApi,\n codeApi,\n userApi,\n permissionApi,\n patientApi,\n healthcarePartyApi,\n deviceApi,\n accessLogApi,\n contactApi,\n healthcareElementApi,\n documentApi,\n formApi,\n invoiceApi,\n insuranceApi,\n messageApi,\n entityReferenceApi,\n receiptApi,\n agendaApi,\n calendarItemApi,\n classificationApi,\n timetableApi,\n groupApi,\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* iCure Data Stack API Documentation
|
|
3
|
-
* The iCure Data Stack Application API is the native interface to iCure.
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: v0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { XHR } from './XHR';
|
|
13
|
-
import { Delegation } from '../model/Delegation';
|
|
14
|
-
import { DocIdentifier } from '../model/DocIdentifier';
|
|
15
|
-
import { FilterChainHealthElement } from '../model/FilterChainHealthElement';
|
|
16
|
-
import { HealthElement } from '../model/HealthElement';
|
|
17
|
-
import { IcureStub } from '../model/IcureStub';
|
|
18
|
-
import { ListOfIds } from '../model/ListOfIds';
|
|
19
|
-
export declare class IccHealthElementApi {
|
|
20
|
-
host: string;
|
|
21
|
-
headers: Array<XHR.Header>;
|
|
22
|
-
fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
23
|
-
constructor(host: string, headers: any, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
|
|
24
|
-
setHeaders(h: Array<XHR.Header>): void;
|
|
25
|
-
handleError(e: XHR.XHRError): never;
|
|
26
|
-
/**
|
|
27
|
-
* Returns an instance of created health element.
|
|
28
|
-
* @summary Create a health element with the current user
|
|
29
|
-
* @param body
|
|
30
|
-
*/
|
|
31
|
-
createHealthElement(body?: HealthElement): Promise<HealthElement>;
|
|
32
|
-
/**
|
|
33
|
-
* Returns the created healthcare elements.
|
|
34
|
-
* @summary Create a batch of healthcare elements
|
|
35
|
-
* @param body
|
|
36
|
-
*/
|
|
37
|
-
createHealthElements(body?: Array<HealthElement>): Promise<Array<HealthElement>>;
|
|
38
|
-
/**
|
|
39
|
-
* Response is a set containing the ID's of deleted health elements.
|
|
40
|
-
* @summary Delete health elements.
|
|
41
|
-
* @param body
|
|
42
|
-
*/
|
|
43
|
-
deleteHealthElements(body?: ListOfIds): Promise<Array<DocIdentifier>>;
|
|
44
|
-
/**
|
|
45
|
-
* Returns a list of health elements along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
|
|
46
|
-
* @summary Filter health elements for the current user (HcParty)
|
|
47
|
-
* @param body
|
|
48
|
-
*/
|
|
49
|
-
filterHealthElementsBy(body?: FilterChainHealthElement): Promise<Array<HealthElement>>;
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* @summary Get a health element
|
|
53
|
-
* @param healthElementId
|
|
54
|
-
*/
|
|
55
|
-
getHealthElement(healthElementId: string): Promise<HealthElement>;
|
|
56
|
-
/**
|
|
57
|
-
* Keys hast to delimited by coma
|
|
58
|
-
* @summary List health elements found By Healthcare Party and secret foreign keyelementIds.
|
|
59
|
-
* @param hcPartyId
|
|
60
|
-
* @param secretFKeys
|
|
61
|
-
*/
|
|
62
|
-
listHealthElementsByHCPartyAndPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<HealthElement>>;
|
|
63
|
-
/**
|
|
64
|
-
* Keys must be delimited by coma
|
|
65
|
-
* @summary List helement stubs found By Healthcare Party and secret foreign keys.
|
|
66
|
-
* @param hcPartyId
|
|
67
|
-
* @param secretFKeys
|
|
68
|
-
*/
|
|
69
|
-
listHealthElementsDelegationsStubsByHCPartyAndPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<IcureStub>>;
|
|
70
|
-
/**
|
|
71
|
-
* Returns the modified health element.
|
|
72
|
-
* @summary Modify a health element
|
|
73
|
-
* @param body
|
|
74
|
-
*/
|
|
75
|
-
modifyHealthElement(body?: HealthElement): Promise<HealthElement>;
|
|
76
|
-
/**
|
|
77
|
-
* Returns the modified health elements.
|
|
78
|
-
* @summary Modify a batch of health elements
|
|
79
|
-
* @param body
|
|
80
|
-
*/
|
|
81
|
-
modifyHealthElements(body?: Array<HealthElement>): Promise<Array<HealthElement>>;
|
|
82
|
-
/**
|
|
83
|
-
* It delegates a health element to a healthcare party (By current healthcare party). Returns the element with new delegations.
|
|
84
|
-
* @summary Delegates a health element to a healthcare party
|
|
85
|
-
* @param body
|
|
86
|
-
* @param healthElementId
|
|
87
|
-
*/
|
|
88
|
-
newHealthElementDelegations(healthElementId: string, body?: Array<Delegation>): Promise<HealthElement>;
|
|
89
|
-
/**
|
|
90
|
-
* Keys must be delimited by coma
|
|
91
|
-
* @summary Update delegations in healthElements.
|
|
92
|
-
* @param body
|
|
93
|
-
*/
|
|
94
|
-
setHealthElementsDelegations(body?: Array<IcureStub>): Promise<Array<HealthElement>>;
|
|
95
|
-
}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IccHealthElementApi = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* iCure Data Stack API Documentation
|
|
6
|
-
* The iCure Data Stack Application API is the native interface to iCure.
|
|
7
|
-
*
|
|
8
|
-
* OpenAPI spec version: v0
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
const XHR_1 = require("./XHR");
|
|
16
|
-
const DocIdentifier_1 = require("../model/DocIdentifier");
|
|
17
|
-
const HealthElement_1 = require("../model/HealthElement");
|
|
18
|
-
const IcureStub_1 = require("../model/IcureStub");
|
|
19
|
-
class IccHealthElementApi {
|
|
20
|
-
constructor(host, headers, fetchImpl) {
|
|
21
|
-
this.host = host;
|
|
22
|
-
this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
|
|
23
|
-
this.fetchImpl = fetchImpl;
|
|
24
|
-
}
|
|
25
|
-
setHeaders(h) {
|
|
26
|
-
this.headers = h;
|
|
27
|
-
}
|
|
28
|
-
handleError(e) {
|
|
29
|
-
throw e;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Returns an instance of created health element.
|
|
33
|
-
* @summary Create a health element with the current user
|
|
34
|
-
* @param body
|
|
35
|
-
*/
|
|
36
|
-
createHealthElement(body) {
|
|
37
|
-
let _body = null;
|
|
38
|
-
_body = body;
|
|
39
|
-
const _url = this.host + `/rest/v2/helement` + '?ts=' + new Date().getTime();
|
|
40
|
-
let headers = this.headers;
|
|
41
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
42
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
43
|
-
.then((doc) => new HealthElement_1.HealthElement(doc.body))
|
|
44
|
-
.catch((err) => this.handleError(err));
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Returns the created healthcare elements.
|
|
48
|
-
* @summary Create a batch of healthcare elements
|
|
49
|
-
* @param body
|
|
50
|
-
*/
|
|
51
|
-
createHealthElements(body) {
|
|
52
|
-
let _body = null;
|
|
53
|
-
_body = body;
|
|
54
|
-
const _url = this.host + `/rest/v2/helement/batch` + '?ts=' + new Date().getTime();
|
|
55
|
-
let headers = this.headers;
|
|
56
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
57
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
58
|
-
.then((doc) => doc.body.map((it) => new HealthElement_1.HealthElement(it)))
|
|
59
|
-
.catch((err) => this.handleError(err));
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Response is a set containing the ID's of deleted health elements.
|
|
63
|
-
* @summary Delete health elements.
|
|
64
|
-
* @param body
|
|
65
|
-
*/
|
|
66
|
-
deleteHealthElements(body) {
|
|
67
|
-
let _body = null;
|
|
68
|
-
_body = body;
|
|
69
|
-
const _url = this.host + `/rest/v2/helement/delete/batch` + '?ts=' + new Date().getTime();
|
|
70
|
-
let headers = this.headers;
|
|
71
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
72
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
73
|
-
.then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
|
|
74
|
-
.catch((err) => this.handleError(err));
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Returns a list of health elements along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
|
|
78
|
-
* @summary Filter health elements for the current user (HcParty)
|
|
79
|
-
* @param body
|
|
80
|
-
*/
|
|
81
|
-
filterHealthElementsBy(body) {
|
|
82
|
-
let _body = null;
|
|
83
|
-
_body = body;
|
|
84
|
-
const _url = this.host + `/rest/v2/helement/filter` + '?ts=' + new Date().getTime();
|
|
85
|
-
let headers = this.headers;
|
|
86
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
87
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
88
|
-
.then((doc) => doc.body.map((it) => new HealthElement_1.HealthElement(it)))
|
|
89
|
-
.catch((err) => this.handleError(err));
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
*
|
|
93
|
-
* @summary Get a health element
|
|
94
|
-
* @param healthElementId
|
|
95
|
-
*/
|
|
96
|
-
getHealthElement(healthElementId) {
|
|
97
|
-
const _body = null;
|
|
98
|
-
const _url = this.host + `/rest/v2/helement/${encodeURIComponent(String(healthElementId))}` + '?ts=' + new Date().getTime();
|
|
99
|
-
const headers = this.headers;
|
|
100
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
101
|
-
.then((doc) => new HealthElement_1.HealthElement(doc.body))
|
|
102
|
-
.catch((err) => this.handleError(err));
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Keys hast to delimited by coma
|
|
106
|
-
* @summary List health elements found By Healthcare Party and secret foreign keyelementIds.
|
|
107
|
-
* @param hcPartyId
|
|
108
|
-
* @param secretFKeys
|
|
109
|
-
*/
|
|
110
|
-
listHealthElementsByHCPartyAndPatientForeignKeys(hcPartyId, secretFKeys) {
|
|
111
|
-
const _body = null;
|
|
112
|
-
const _url = this.host +
|
|
113
|
-
`/rest/v2/helement/byHcPartySecretForeignKeys` +
|
|
114
|
-
'?ts=' +
|
|
115
|
-
new Date().getTime() +
|
|
116
|
-
(hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
|
|
117
|
-
(secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
|
|
118
|
-
const headers = this.headers;
|
|
119
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
120
|
-
.then((doc) => doc.body.map((it) => new HealthElement_1.HealthElement(it)))
|
|
121
|
-
.catch((err) => this.handleError(err));
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Keys must be delimited by coma
|
|
125
|
-
* @summary List helement stubs found By Healthcare Party and secret foreign keys.
|
|
126
|
-
* @param hcPartyId
|
|
127
|
-
* @param secretFKeys
|
|
128
|
-
*/
|
|
129
|
-
listHealthElementsDelegationsStubsByHCPartyAndPatientForeignKeys(hcPartyId, secretFKeys) {
|
|
130
|
-
const _body = null;
|
|
131
|
-
const _url = this.host +
|
|
132
|
-
`/rest/v2/helement/byHcPartySecretForeignKeys/delegations` +
|
|
133
|
-
'?ts=' +
|
|
134
|
-
new Date().getTime() +
|
|
135
|
-
(hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
|
|
136
|
-
(secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
|
|
137
|
-
const headers = this.headers;
|
|
138
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
139
|
-
.then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
|
|
140
|
-
.catch((err) => this.handleError(err));
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Returns the modified health element.
|
|
144
|
-
* @summary Modify a health element
|
|
145
|
-
* @param body
|
|
146
|
-
*/
|
|
147
|
-
modifyHealthElement(body) {
|
|
148
|
-
let _body = null;
|
|
149
|
-
_body = body;
|
|
150
|
-
const _url = this.host + `/rest/v2/helement` + '?ts=' + new Date().getTime();
|
|
151
|
-
let headers = this.headers;
|
|
152
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
153
|
-
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
|
|
154
|
-
.then((doc) => new HealthElement_1.HealthElement(doc.body))
|
|
155
|
-
.catch((err) => this.handleError(err));
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Returns the modified health elements.
|
|
159
|
-
* @summary Modify a batch of health elements
|
|
160
|
-
* @param body
|
|
161
|
-
*/
|
|
162
|
-
modifyHealthElements(body) {
|
|
163
|
-
let _body = null;
|
|
164
|
-
_body = body;
|
|
165
|
-
const _url = this.host + `/rest/v2/helement/batch` + '?ts=' + new Date().getTime();
|
|
166
|
-
let headers = this.headers;
|
|
167
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
168
|
-
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
|
|
169
|
-
.then((doc) => doc.body.map((it) => new HealthElement_1.HealthElement(it)))
|
|
170
|
-
.catch((err) => this.handleError(err));
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* It delegates a health element to a healthcare party (By current healthcare party). Returns the element with new delegations.
|
|
174
|
-
* @summary Delegates a health element to a healthcare party
|
|
175
|
-
* @param body
|
|
176
|
-
* @param healthElementId
|
|
177
|
-
*/
|
|
178
|
-
newHealthElementDelegations(healthElementId, body) {
|
|
179
|
-
let _body = null;
|
|
180
|
-
_body = body;
|
|
181
|
-
const _url = this.host + `/rest/v2/helement/${encodeURIComponent(String(healthElementId))}/delegate` + '?ts=' + new Date().getTime();
|
|
182
|
-
let headers = this.headers;
|
|
183
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
184
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
185
|
-
.then((doc) => new HealthElement_1.HealthElement(doc.body))
|
|
186
|
-
.catch((err) => this.handleError(err));
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Keys must be delimited by coma
|
|
190
|
-
* @summary Update delegations in healthElements.
|
|
191
|
-
* @param body
|
|
192
|
-
*/
|
|
193
|
-
setHealthElementsDelegations(body) {
|
|
194
|
-
let _body = null;
|
|
195
|
-
_body = body;
|
|
196
|
-
const _url = this.host + `/rest/v2/helement/delegations` + '?ts=' + new Date().getTime();
|
|
197
|
-
let headers = this.headers;
|
|
198
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
199
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
200
|
-
.then((doc) => doc.body.map((it) => new HealthElement_1.HealthElement(it)))
|
|
201
|
-
.catch((err) => this.handleError(err));
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
exports.IccHealthElementApi = IccHealthElementApi;
|
|
205
|
-
//# sourceMappingURL=IccHealthElementApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IccHealthElementApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccHealthElementApi.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAE3B,0DAAsD;AAEtD,0DAAsD;AACtD,kDAA8C;AAG9C,MAAa,mBAAmB;IAK9B,YAAY,IAAY,EAAE,OAAY,EAAE,SAAyE;QAC/G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7E,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,WAAW,CAAC,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,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;QACvH,OAAO,SAAG,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;aACjE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,6BAAa,CAAC,EAAE,CAAC,CAAC,CAAC;aAC3E,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AAtND,kDAsNC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure.\n *\n * OpenAPI spec version: v0\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { Delegation } from '../model/Delegation'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { FilterChainHealthElement } from '../model/FilterChainHealthElement'\nimport { HealthElement } from '../model/HealthElement'\nimport { IcureStub } from '../model/IcureStub'\nimport { ListOfIds } from '../model/ListOfIds'\n\nexport class IccHealthElementApi {\n host: string\n headers: Array<XHR.Header>\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n constructor(host: string, headers: any, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>) {\n this.host = host\n this.headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this.headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Returns an instance of created health element.\n * @summary Create a health element with the current user\n * @param body\n */\n createHealthElement(body?: HealthElement): Promise<HealthElement> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthElement(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the created healthcare elements.\n * @summary Create a batch of healthcare elements\n * @param body\n */\n createHealthElements(body?: Array<HealthElement>): Promise<Array<HealthElement>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthElement(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Response is a set containing the ID's of deleted health elements.\n * @summary Delete health elements.\n * @param body\n */\n deleteHealthElements(body?: ListOfIds): Promise<Array<DocIdentifier>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement/delete/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of health elements along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.\n * @summary Filter health elements for the current user (HcParty)\n * @param body\n */\n filterHealthElementsBy(body?: FilterChainHealthElement): Promise<Array<HealthElement>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement/filter` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthElement(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get a health element\n * @param healthElementId\n */\n getHealthElement(healthElementId: string): Promise<HealthElement> {\n const _body = null\n\n const _url = this.host + `/rest/v2/helement/${encodeURIComponent(String(healthElementId))}` + '?ts=' + new Date().getTime()\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthElement(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys hast to delimited by coma\n * @summary List health elements found By Healthcare Party and secret foreign keyelementIds.\n * @param hcPartyId\n * @param secretFKeys\n */\n listHealthElementsByHCPartyAndPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<HealthElement>> {\n const _body = null\n\n const _url =\n this.host +\n `/rest/v2/helement/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '')\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthElement(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary List helement stubs found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param secretFKeys\n */\n listHealthElementsDelegationsStubsByHCPartyAndPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<IcureStub>> {\n const _body = null\n\n const _url =\n this.host +\n `/rest/v2/helement/byHcPartySecretForeignKeys/delegations` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '')\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified health element.\n * @summary Modify a health element\n * @param body\n */\n modifyHealthElement(body?: HealthElement): Promise<HealthElement> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthElement(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified health elements.\n * @summary Modify a batch of health elements\n * @param body\n */\n modifyHealthElements(body?: Array<HealthElement>): Promise<Array<HealthElement>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthElement(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * It delegates a health element to a healthcare party (By current healthcare party). Returns the element with new delegations.\n * @summary Delegates a health element to a healthcare party\n * @param body\n * @param healthElementId\n */\n newHealthElementDelegations(healthElementId: string, body?: Array<Delegation>): Promise<HealthElement> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement/${encodeURIComponent(String(healthElementId))}/delegate` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthElement(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary Update delegations in healthElements.\n * @param body\n */\n setHealthElementsDelegations(body?: Array<IcureStub>): Promise<Array<HealthElement>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/helement/delegations` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthElement(it)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* iCure Data Stack API Documentation
|
|
3
|
-
* The iCure Data Stack Application API is the native interface to iCure.
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: v0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { XHR } from './XHR';
|
|
13
|
-
import { DocIdentifier } from '../model/DocIdentifier';
|
|
14
|
-
import { HealthcareParty } from '../model/HealthcareParty';
|
|
15
|
-
import { ListOfIds } from '../model/ListOfIds';
|
|
16
|
-
import { PaginatedListHealthcareParty } from '../model/PaginatedListHealthcareParty';
|
|
17
|
-
import { PublicKey } from '../model/PublicKey';
|
|
18
|
-
export declare class IccHealthcarePartyApi {
|
|
19
|
-
host: string;
|
|
20
|
-
headers: Array<XHR.Header>;
|
|
21
|
-
fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
22
|
-
constructor(host: string, headers: any, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
|
|
23
|
-
setHeaders(h: Array<XHR.Header>): void;
|
|
24
|
-
handleError(e: XHR.XHRError): never;
|
|
25
|
-
/**
|
|
26
|
-
* One of Name or Last name+First name, Nihii, and Public key are required.
|
|
27
|
-
* @summary Create a healthcare party
|
|
28
|
-
* @param body
|
|
29
|
-
*/
|
|
30
|
-
createHealthcareParty(body?: HealthcareParty): Promise<HealthcareParty>;
|
|
31
|
-
/**
|
|
32
|
-
* One of Name or Last name+First name, Nihii, and Public key are required.
|
|
33
|
-
* @summary Create a healthcare party
|
|
34
|
-
* @param body
|
|
35
|
-
* @param groupId
|
|
36
|
-
*/
|
|
37
|
-
createHealthcarePartyInGroup(groupId: string, body?: HealthcareParty): Promise<HealthcareParty>;
|
|
38
|
-
/**
|
|
39
|
-
* Deleting healthcareParties. Response is an array containing the id of deleted healthcare parties.
|
|
40
|
-
* @summary Delete healthcare parties
|
|
41
|
-
* @param body
|
|
42
|
-
*/
|
|
43
|
-
deleteHealthcareParties(body?: ListOfIds): Promise<Array<DocIdentifier>>;
|
|
44
|
-
/**
|
|
45
|
-
* Deleting a healthcareParty. Response is an array containing the id of deleted healthcare party.
|
|
46
|
-
* @summary Delete a healthcare party
|
|
47
|
-
* @param body
|
|
48
|
-
* @param groupId
|
|
49
|
-
*/
|
|
50
|
-
deleteHealthcarePartiesInGroup(groupId: string, body?: ListOfIds): Promise<Array<DocIdentifier>>;
|
|
51
|
-
/**
|
|
52
|
-
* Returns a list of healthcare parties.
|
|
53
|
-
* @summary List healthcare parties with(out) pagination
|
|
54
|
-
* @param startKey A healthcare party Last name
|
|
55
|
-
* @param startDocumentId A healthcare party document ID
|
|
56
|
-
* @param limit Number of rows
|
|
57
|
-
* @param desc Descending
|
|
58
|
-
*/
|
|
59
|
-
findHealthcarePartiesBy(startKey?: string, startDocumentId?: string, limit?: number, desc?: boolean): Promise<PaginatedListHealthcareParty>;
|
|
60
|
-
/**
|
|
61
|
-
* Returns a list of healthcare parties.
|
|
62
|
-
* @summary Find healthcare parties by name with(out) pagination
|
|
63
|
-
* @param name The Last name search value
|
|
64
|
-
* @param startKey A healthcare party Last name
|
|
65
|
-
* @param startDocumentId A healthcare party document ID
|
|
66
|
-
* @param limit Number of rows
|
|
67
|
-
* @param desc Descending
|
|
68
|
-
*/
|
|
69
|
-
findHealthcarePartiesByName(name?: string, startKey?: string, startDocumentId?: string, limit?: number, desc?: boolean): Promise<PaginatedListHealthcareParty>;
|
|
70
|
-
/**
|
|
71
|
-
* Returns a list of healthcare parties.
|
|
72
|
-
* @summary Find healthcare parties by name with(out) pagination
|
|
73
|
-
* @param type The type of the HCP (persphysician)
|
|
74
|
-
* @param spec The speciality of the HCP
|
|
75
|
-
* @param firstCode The first postCode for the HCP
|
|
76
|
-
* @param lastCode The last postCode for the HCP
|
|
77
|
-
* @param limit Number of rows
|
|
78
|
-
*/
|
|
79
|
-
findHealthcarePartiesBySpecialityAndPostCode(type: string, spec: string, firstCode: string, lastCode: string, limit?: number): Promise<PaginatedListHealthcareParty>;
|
|
80
|
-
/**
|
|
81
|
-
* Returns a list of healthcare parties.
|
|
82
|
-
* @summary Find healthcare parties by nihii or ssin with(out) pagination
|
|
83
|
-
* @param searchValue
|
|
84
|
-
* @param startKey A healthcare party Last name
|
|
85
|
-
* @param startDocumentId A healthcare party document ID
|
|
86
|
-
* @param limit Number of rows
|
|
87
|
-
* @param desc Descending
|
|
88
|
-
*/
|
|
89
|
-
findHealthcarePartiesBySsinOrNihii(searchValue: string, startKey?: string, startDocumentId?: string, limit?: number, desc?: boolean): Promise<PaginatedListHealthcareParty>;
|
|
90
|
-
/**
|
|
91
|
-
* General information about the current healthcare Party
|
|
92
|
-
* @summary Get the current healthcare party if logged in.
|
|
93
|
-
*/
|
|
94
|
-
getCurrentHealthcareParty(): Promise<HealthcareParty>;
|
|
95
|
-
/**
|
|
96
|
-
* (key, value) of the map is as follows: (ID of the owner of the encrypted AES key, encrypted AES key)
|
|
97
|
-
* @summary Get the HcParty encrypted AES keys indexed by owner
|
|
98
|
-
* @param healthcarePartyId
|
|
99
|
-
*/
|
|
100
|
-
getHcPartyKeysForDelegate(healthcarePartyId: string): Promise<{
|
|
101
|
-
[key: string]: string;
|
|
102
|
-
}>;
|
|
103
|
-
/**
|
|
104
|
-
* General information about the healthcare Party
|
|
105
|
-
* @summary Get healthcareParties by their IDs
|
|
106
|
-
* @param body
|
|
107
|
-
*/
|
|
108
|
-
getHealthcareParties(body?: ListOfIds): Promise<Array<HealthcareParty>>;
|
|
109
|
-
/**
|
|
110
|
-
* General information about the healthcare Party
|
|
111
|
-
* @summary Get a healthcareParty by his ID
|
|
112
|
-
* @param healthcarePartyId
|
|
113
|
-
*/
|
|
114
|
-
getHealthcareParty(healthcarePartyId: string): Promise<HealthcareParty>;
|
|
115
|
-
/**
|
|
116
|
-
* Returns the public key of a healthcare party in Hex
|
|
117
|
-
* @summary Get public key of a healthcare party
|
|
118
|
-
* @param healthcarePartyId
|
|
119
|
-
*/
|
|
120
|
-
getPublicKey(healthcarePartyId: string): Promise<PublicKey>;
|
|
121
|
-
/**
|
|
122
|
-
* Returns a list of healthcare parties.
|
|
123
|
-
* @summary Find healthcare parties by name with(out) pagination
|
|
124
|
-
* @param name The Last name search value
|
|
125
|
-
*/
|
|
126
|
-
listHealthcarePartiesByName(name: string): Promise<Array<HealthcareParty>>;
|
|
127
|
-
/**
|
|
128
|
-
* Return a list of children hcp.
|
|
129
|
-
* @summary Find children of an healthcare parties
|
|
130
|
-
* @param parentId
|
|
131
|
-
*/
|
|
132
|
-
listHealthcarePartiesByParentId(parentId: string): Promise<Array<HealthcareParty>>;
|
|
133
|
-
/**
|
|
134
|
-
* No particular return value. It's just a message.
|
|
135
|
-
* @summary Modify a Healthcare Party.
|
|
136
|
-
* @param body
|
|
137
|
-
*/
|
|
138
|
-
modifyHealthcareParty(body?: HealthcareParty): Promise<HealthcareParty>;
|
|
139
|
-
/**
|
|
140
|
-
* No particular return value. It's just a message.
|
|
141
|
-
* @summary Modify a Healthcare Party.
|
|
142
|
-
* @param body
|
|
143
|
-
* @param groupId
|
|
144
|
-
*/
|
|
145
|
-
modifyHealthcarePartyInGroup(groupId: string, body?: HealthcareParty): Promise<HealthcareParty>;
|
|
146
|
-
}
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IccHealthcarePartyApi = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* iCure Data Stack API Documentation
|
|
6
|
-
* The iCure Data Stack Application API is the native interface to iCure.
|
|
7
|
-
*
|
|
8
|
-
* OpenAPI spec version: v0
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
const XHR_1 = require("./XHR");
|
|
16
|
-
const DocIdentifier_1 = require("../model/DocIdentifier");
|
|
17
|
-
const HealthcareParty_1 = require("../model/HealthcareParty");
|
|
18
|
-
const PaginatedListHealthcareParty_1 = require("../model/PaginatedListHealthcareParty");
|
|
19
|
-
const PublicKey_1 = require("../model/PublicKey");
|
|
20
|
-
class IccHealthcarePartyApi {
|
|
21
|
-
constructor(host, headers, fetchImpl) {
|
|
22
|
-
this.host = host;
|
|
23
|
-
this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
|
|
24
|
-
this.fetchImpl = fetchImpl;
|
|
25
|
-
}
|
|
26
|
-
setHeaders(h) {
|
|
27
|
-
this.headers = h;
|
|
28
|
-
}
|
|
29
|
-
handleError(e) {
|
|
30
|
-
throw e;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* One of Name or Last name+First name, Nihii, and Public key are required.
|
|
34
|
-
* @summary Create a healthcare party
|
|
35
|
-
* @param body
|
|
36
|
-
*/
|
|
37
|
-
createHealthcareParty(body) {
|
|
38
|
-
let _body = null;
|
|
39
|
-
_body = body;
|
|
40
|
-
const _url = this.host + `/rest/v2/hcparty` + '?ts=' + new Date().getTime();
|
|
41
|
-
let headers = this.headers;
|
|
42
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
43
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
44
|
-
.then((doc) => new HealthcareParty_1.HealthcareParty(doc.body))
|
|
45
|
-
.catch((err) => this.handleError(err));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* One of Name or Last name+First name, Nihii, and Public key are required.
|
|
49
|
-
* @summary Create a healthcare party
|
|
50
|
-
* @param body
|
|
51
|
-
* @param groupId
|
|
52
|
-
*/
|
|
53
|
-
createHealthcarePartyInGroup(groupId, body) {
|
|
54
|
-
let _body = null;
|
|
55
|
-
_body = body;
|
|
56
|
-
const _url = this.host + `/rest/v2/hcparty/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime();
|
|
57
|
-
let headers = this.headers;
|
|
58
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
59
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
60
|
-
.then((doc) => new HealthcareParty_1.HealthcareParty(doc.body))
|
|
61
|
-
.catch((err) => this.handleError(err));
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Deleting healthcareParties. Response is an array containing the id of deleted healthcare parties.
|
|
65
|
-
* @summary Delete healthcare parties
|
|
66
|
-
* @param body
|
|
67
|
-
*/
|
|
68
|
-
deleteHealthcareParties(body) {
|
|
69
|
-
let _body = null;
|
|
70
|
-
_body = body;
|
|
71
|
-
const _url = this.host + `/rest/v2/hcparty/delete/batch` + '?ts=' + new Date().getTime();
|
|
72
|
-
let headers = this.headers;
|
|
73
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
74
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
75
|
-
.then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
|
|
76
|
-
.catch((err) => this.handleError(err));
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Deleting a healthcareParty. Response is an array containing the id of deleted healthcare party.
|
|
80
|
-
* @summary Delete a healthcare party
|
|
81
|
-
* @param body
|
|
82
|
-
* @param groupId
|
|
83
|
-
*/
|
|
84
|
-
deleteHealthcarePartiesInGroup(groupId, body) {
|
|
85
|
-
let _body = null;
|
|
86
|
-
_body = body;
|
|
87
|
-
const _url = this.host + `/rest/v2/hcparty/delete/batch/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime();
|
|
88
|
-
let headers = this.headers;
|
|
89
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
90
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
91
|
-
.then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
|
|
92
|
-
.catch((err) => this.handleError(err));
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Returns a list of healthcare parties.
|
|
96
|
-
* @summary List healthcare parties with(out) pagination
|
|
97
|
-
* @param startKey A healthcare party Last name
|
|
98
|
-
* @param startDocumentId A healthcare party document ID
|
|
99
|
-
* @param limit Number of rows
|
|
100
|
-
* @param desc Descending
|
|
101
|
-
*/
|
|
102
|
-
findHealthcarePartiesBy(startKey, startDocumentId, limit, desc) {
|
|
103
|
-
const _body = null;
|
|
104
|
-
const _url = this.host +
|
|
105
|
-
`/rest/v2/hcparty` +
|
|
106
|
-
'?ts=' +
|
|
107
|
-
new Date().getTime() +
|
|
108
|
-
(startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
|
|
109
|
-
(startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
|
|
110
|
-
(limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
|
|
111
|
-
(desc ? '&desc=' + encodeURIComponent(String(desc)) : '');
|
|
112
|
-
const headers = this.headers;
|
|
113
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
114
|
-
.then((doc) => new PaginatedListHealthcareParty_1.PaginatedListHealthcareParty(doc.body))
|
|
115
|
-
.catch((err) => this.handleError(err));
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Returns a list of healthcare parties.
|
|
119
|
-
* @summary Find healthcare parties by name with(out) pagination
|
|
120
|
-
* @param name The Last name search value
|
|
121
|
-
* @param startKey A healthcare party Last name
|
|
122
|
-
* @param startDocumentId A healthcare party document ID
|
|
123
|
-
* @param limit Number of rows
|
|
124
|
-
* @param desc Descending
|
|
125
|
-
*/
|
|
126
|
-
findHealthcarePartiesByName(name, startKey, startDocumentId, limit, desc) {
|
|
127
|
-
const _body = null;
|
|
128
|
-
const _url = this.host +
|
|
129
|
-
`/rest/v2/hcparty/byName` +
|
|
130
|
-
'?ts=' +
|
|
131
|
-
new Date().getTime() +
|
|
132
|
-
(name ? '&name=' + encodeURIComponent(String(name)) : '') +
|
|
133
|
-
(startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
|
|
134
|
-
(startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
|
|
135
|
-
(limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
|
|
136
|
-
(desc ? '&desc=' + encodeURIComponent(String(desc)) : '');
|
|
137
|
-
const headers = this.headers;
|
|
138
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
139
|
-
.then((doc) => new PaginatedListHealthcareParty_1.PaginatedListHealthcareParty(doc.body))
|
|
140
|
-
.catch((err) => this.handleError(err));
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Returns a list of healthcare parties.
|
|
144
|
-
* @summary Find healthcare parties by name with(out) pagination
|
|
145
|
-
* @param type The type of the HCP (persphysician)
|
|
146
|
-
* @param spec The speciality of the HCP
|
|
147
|
-
* @param firstCode The first postCode for the HCP
|
|
148
|
-
* @param lastCode The last postCode for the HCP
|
|
149
|
-
* @param limit Number of rows
|
|
150
|
-
*/
|
|
151
|
-
findHealthcarePartiesBySpecialityAndPostCode(type, spec, firstCode, lastCode, limit) {
|
|
152
|
-
const _body = null;
|
|
153
|
-
const _url = this.host +
|
|
154
|
-
`/rest/v2/hcparty/bySpecialityAndPostCode/${encodeURIComponent(String(type))}/${encodeURIComponent(String(spec))}/${encodeURIComponent(String(firstCode))}/to/${encodeURIComponent(String(lastCode))}` +
|
|
155
|
-
'?ts=' +
|
|
156
|
-
new Date().getTime() +
|
|
157
|
-
(limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
|
|
158
|
-
const headers = this.headers;
|
|
159
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
160
|
-
.then((doc) => new PaginatedListHealthcareParty_1.PaginatedListHealthcareParty(doc.body))
|
|
161
|
-
.catch((err) => this.handleError(err));
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Returns a list of healthcare parties.
|
|
165
|
-
* @summary Find healthcare parties by nihii or ssin with(out) pagination
|
|
166
|
-
* @param searchValue
|
|
167
|
-
* @param startKey A healthcare party Last name
|
|
168
|
-
* @param startDocumentId A healthcare party document ID
|
|
169
|
-
* @param limit Number of rows
|
|
170
|
-
* @param desc Descending
|
|
171
|
-
*/
|
|
172
|
-
findHealthcarePartiesBySsinOrNihii(searchValue, startKey, startDocumentId, limit, desc) {
|
|
173
|
-
const _body = null;
|
|
174
|
-
const _url = this.host +
|
|
175
|
-
`/rest/v2/hcparty/byNihiiOrSsin/${encodeURIComponent(String(searchValue))}` +
|
|
176
|
-
'?ts=' +
|
|
177
|
-
new Date().getTime() +
|
|
178
|
-
(startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
|
|
179
|
-
(startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
|
|
180
|
-
(limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
|
|
181
|
-
(desc ? '&desc=' + encodeURIComponent(String(desc)) : '');
|
|
182
|
-
const headers = this.headers;
|
|
183
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
184
|
-
.then((doc) => new PaginatedListHealthcareParty_1.PaginatedListHealthcareParty(doc.body))
|
|
185
|
-
.catch((err) => this.handleError(err));
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* General information about the current healthcare Party
|
|
189
|
-
* @summary Get the current healthcare party if logged in.
|
|
190
|
-
*/
|
|
191
|
-
getCurrentHealthcareParty() {
|
|
192
|
-
const _body = null;
|
|
193
|
-
const _url = this.host + `/rest/v2/hcparty/current` + '?ts=' + new Date().getTime();
|
|
194
|
-
const headers = this.headers;
|
|
195
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
196
|
-
.then((doc) => new HealthcareParty_1.HealthcareParty(doc.body))
|
|
197
|
-
.catch((err) => this.handleError(err));
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* (key, value) of the map is as follows: (ID of the owner of the encrypted AES key, encrypted AES key)
|
|
201
|
-
* @summary Get the HcParty encrypted AES keys indexed by owner
|
|
202
|
-
* @param healthcarePartyId
|
|
203
|
-
*/
|
|
204
|
-
getHcPartyKeysForDelegate(healthcarePartyId) {
|
|
205
|
-
const _body = null;
|
|
206
|
-
const _url = this.host + `/rest/v2/hcparty/byKeys/${encodeURIComponent(String(healthcarePartyId))}` + '?ts=' + new Date().getTime();
|
|
207
|
-
const headers = this.headers;
|
|
208
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
209
|
-
.then((doc) => JSON.parse(JSON.stringify(doc.body)))
|
|
210
|
-
.catch((err) => this.handleError(err));
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* General information about the healthcare Party
|
|
214
|
-
* @summary Get healthcareParties by their IDs
|
|
215
|
-
* @param body
|
|
216
|
-
*/
|
|
217
|
-
getHealthcareParties(body) {
|
|
218
|
-
let _body = null;
|
|
219
|
-
_body = body;
|
|
220
|
-
const _url = this.host + `/rest/v2/hcparty/byIds` + '?ts=' + new Date().getTime();
|
|
221
|
-
let headers = this.headers;
|
|
222
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
223
|
-
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
|
|
224
|
-
.then((doc) => doc.body.map((it) => new HealthcareParty_1.HealthcareParty(it)))
|
|
225
|
-
.catch((err) => this.handleError(err));
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* General information about the healthcare Party
|
|
229
|
-
* @summary Get a healthcareParty by his ID
|
|
230
|
-
* @param healthcarePartyId
|
|
231
|
-
*/
|
|
232
|
-
getHealthcareParty(healthcarePartyId) {
|
|
233
|
-
const _body = null;
|
|
234
|
-
const _url = this.host + `/rest/v2/hcparty/${encodeURIComponent(String(healthcarePartyId))}` + '?ts=' + new Date().getTime();
|
|
235
|
-
const headers = this.headers;
|
|
236
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
237
|
-
.then((doc) => new HealthcareParty_1.HealthcareParty(doc.body))
|
|
238
|
-
.catch((err) => this.handleError(err));
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Returns the public key of a healthcare party in Hex
|
|
242
|
-
* @summary Get public key of a healthcare party
|
|
243
|
-
* @param healthcarePartyId
|
|
244
|
-
*/
|
|
245
|
-
getPublicKey(healthcarePartyId) {
|
|
246
|
-
const _body = null;
|
|
247
|
-
const _url = this.host + `/rest/v2/hcparty/${encodeURIComponent(String(healthcarePartyId))}/publicKey` + '?ts=' + new Date().getTime();
|
|
248
|
-
const headers = this.headers;
|
|
249
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
250
|
-
.then((doc) => new PublicKey_1.PublicKey(doc.body))
|
|
251
|
-
.catch((err) => this.handleError(err));
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Returns a list of healthcare parties.
|
|
255
|
-
* @summary Find healthcare parties by name with(out) pagination
|
|
256
|
-
* @param name The Last name search value
|
|
257
|
-
*/
|
|
258
|
-
listHealthcarePartiesByName(name) {
|
|
259
|
-
const _body = null;
|
|
260
|
-
const _url = this.host + `/rest/v2/hcparty/byNameStrict/${encodeURIComponent(String(name))}` + '?ts=' + new Date().getTime();
|
|
261
|
-
const headers = this.headers;
|
|
262
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
263
|
-
.then((doc) => doc.body.map((it) => new HealthcareParty_1.HealthcareParty(it)))
|
|
264
|
-
.catch((err) => this.handleError(err));
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Return a list of children hcp.
|
|
268
|
-
* @summary Find children of an healthcare parties
|
|
269
|
-
* @param parentId
|
|
270
|
-
*/
|
|
271
|
-
listHealthcarePartiesByParentId(parentId) {
|
|
272
|
-
const _body = null;
|
|
273
|
-
const _url = this.host + `/rest/v2/hcparty/${encodeURIComponent(String(parentId))}/children` + '?ts=' + new Date().getTime();
|
|
274
|
-
const headers = this.headers;
|
|
275
|
-
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
|
|
276
|
-
.then((doc) => doc.body.map((it) => new HealthcareParty_1.HealthcareParty(it)))
|
|
277
|
-
.catch((err) => this.handleError(err));
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* No particular return value. It's just a message.
|
|
281
|
-
* @summary Modify a Healthcare Party.
|
|
282
|
-
* @param body
|
|
283
|
-
*/
|
|
284
|
-
modifyHealthcareParty(body) {
|
|
285
|
-
let _body = null;
|
|
286
|
-
_body = body;
|
|
287
|
-
const _url = this.host + `/rest/v2/hcparty` + '?ts=' + new Date().getTime();
|
|
288
|
-
let headers = this.headers;
|
|
289
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
290
|
-
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
|
|
291
|
-
.then((doc) => new HealthcareParty_1.HealthcareParty(doc.body))
|
|
292
|
-
.catch((err) => this.handleError(err));
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* No particular return value. It's just a message.
|
|
296
|
-
* @summary Modify a Healthcare Party.
|
|
297
|
-
* @param body
|
|
298
|
-
* @param groupId
|
|
299
|
-
*/
|
|
300
|
-
modifyHealthcarePartyInGroup(groupId, body) {
|
|
301
|
-
let _body = null;
|
|
302
|
-
_body = body;
|
|
303
|
-
const _url = this.host + `/rest/v2/hcparty/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime();
|
|
304
|
-
let headers = this.headers;
|
|
305
|
-
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
306
|
-
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
|
|
307
|
-
.then((doc) => new HealthcareParty_1.HealthcareParty(doc.body))
|
|
308
|
-
.catch((err) => this.handleError(err));
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
exports.IccHealthcarePartyApi = IccHealthcarePartyApi;
|
|
312
|
-
//# sourceMappingURL=IccHealthcarePartyApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IccHealthcarePartyApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccHealthcarePartyApi.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,8DAA0D;AAE1D,wFAAoF;AACpF,kDAA8C;AAE9C,MAAa,qBAAqB;IAKhC,YAAY,IAAY,EAAE,OAAY,EAAE,SAAyE;QAC/G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IA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CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;IAED;;;;;OAKG;IACH,4BAA4B,CAAC,OAAe,EAAE,IAAsB;QAClE,IAAI,KAAK,GAAG,IAAI,CAAA;QAChB,KAAK,GAAG,IAAI,CAAA;QAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,4BAA4B,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;QAC1H,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAC1B,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;QACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;aAChE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,iCAAe,CAAC,GAAG,CAAC,IAAY,CAAC,CAAC;aACpD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AAlWD,sDAkWC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure.\n *\n * OpenAPI spec version: v0\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { HealthcareParty } from '../model/HealthcareParty'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { PaginatedListHealthcareParty } from '../model/PaginatedListHealthcareParty'\nimport { PublicKey } from '../model/PublicKey'\n\nexport class IccHealthcarePartyApi {\n host: string\n headers: Array<XHR.Header>\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n constructor(host: string, headers: any, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>) {\n this.host = host\n this.headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this.headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * One of Name or Last name+First name, Nihii, and Public key are required.\n * @summary Create a healthcare party\n * @param body\n */\n createHealthcareParty(body?: HealthcareParty): Promise<HealthcareParty> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/hcparty` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * One of Name or Last name+First name, Nihii, and Public key are required.\n * @summary Create a healthcare party\n * @param body\n * @param groupId\n */\n createHealthcarePartyInGroup(groupId: string, body?: HealthcareParty): Promise<HealthcareParty> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/hcparty/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deleting healthcareParties. Response is an array containing the id of deleted healthcare parties.\n * @summary Delete healthcare parties\n * @param body\n */\n deleteHealthcareParties(body?: ListOfIds): Promise<Array<DocIdentifier>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/hcparty/delete/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deleting a healthcareParty. Response is an array containing the id of deleted healthcare party.\n * @summary Delete a healthcare party\n * @param body\n * @param groupId\n */\n deleteHealthcarePartiesInGroup(groupId: string, body?: ListOfIds): Promise<Array<DocIdentifier>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/hcparty/delete/batch/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of healthcare parties.\n * @summary List healthcare parties with(out) pagination\n * @param startKey A healthcare party Last name\n * @param startDocumentId A healthcare party document ID\n * @param limit Number of rows\n * @param desc Descending\n */\n findHealthcarePartiesBy(startKey?: string, startDocumentId?: string, limit?: number, desc?: boolean): Promise<PaginatedListHealthcareParty> {\n const _body = null\n\n const _url =\n this.host +\n `/rest/v2/hcparty` +\n '?ts=' +\n new Date().getTime() +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (desc ? '&desc=' + encodeURIComponent(String(desc)) : '')\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new PaginatedListHealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of healthcare parties.\n * @summary Find healthcare parties by name with(out) pagination\n * @param name The Last name search value\n * @param startKey A healthcare party Last name\n * @param startDocumentId A healthcare party document ID\n * @param limit Number of rows\n * @param desc Descending\n */\n findHealthcarePartiesByName(\n name?: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number,\n desc?: boolean\n ): Promise<PaginatedListHealthcareParty> {\n const _body = null\n\n const _url =\n this.host +\n `/rest/v2/hcparty/byName` +\n '?ts=' +\n new Date().getTime() +\n (name ? '&name=' + encodeURIComponent(String(name)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (desc ? '&desc=' + encodeURIComponent(String(desc)) : '')\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new PaginatedListHealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of healthcare parties.\n * @summary Find healthcare parties by name with(out) pagination\n * @param type The type of the HCP (persphysician)\n * @param spec The speciality of the HCP\n * @param firstCode The first postCode for the HCP\n * @param lastCode The last postCode for the HCP\n * @param limit Number of rows\n */\n findHealthcarePartiesBySpecialityAndPostCode(\n type: string,\n spec: string,\n firstCode: string,\n lastCode: string,\n limit?: number\n ): Promise<PaginatedListHealthcareParty> {\n const _body = null\n\n const _url =\n this.host +\n `/rest/v2/hcparty/bySpecialityAndPostCode/${encodeURIComponent(String(type))}/${encodeURIComponent(String(spec))}/${encodeURIComponent(\n String(firstCode)\n )}/to/${encodeURIComponent(String(lastCode))}` +\n '?ts=' +\n new Date().getTime() +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new PaginatedListHealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of healthcare parties.\n * @summary Find healthcare parties by nihii or ssin with(out) pagination\n * @param searchValue\n * @param startKey A healthcare party Last name\n * @param startDocumentId A healthcare party document ID\n * @param limit Number of rows\n * @param desc Descending\n */\n findHealthcarePartiesBySsinOrNihii(\n searchValue: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number,\n desc?: boolean\n ): Promise<PaginatedListHealthcareParty> {\n const _body = null\n\n const _url =\n this.host +\n `/rest/v2/hcparty/byNihiiOrSsin/${encodeURIComponent(String(searchValue))}` +\n '?ts=' +\n new Date().getTime() +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (desc ? '&desc=' + encodeURIComponent(String(desc)) : '')\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new PaginatedListHealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * General information about the current healthcare Party\n * @summary Get the current healthcare party if logged in.\n */\n getCurrentHealthcareParty(): Promise<HealthcareParty> {\n const _body = null\n\n const _url = this.host + `/rest/v2/hcparty/current` + '?ts=' + new Date().getTime()\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * (key, value) of the map is as follows: (ID of the owner of the encrypted AES key, encrypted AES key)\n * @summary Get the HcParty encrypted AES keys indexed by owner\n * @param healthcarePartyId\n */\n getHcPartyKeysForDelegate(healthcarePartyId: string): Promise<{ [key: string]: string }> {\n const _body = null\n\n const _url = this.host + `/rest/v2/hcparty/byKeys/${encodeURIComponent(String(healthcarePartyId))}` + '?ts=' + new Date().getTime()\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * General information about the healthcare Party\n * @summary Get healthcareParties by their IDs\n * @param body\n */\n getHealthcareParties(body?: ListOfIds): Promise<Array<HealthcareParty>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/hcparty/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthcareParty(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * General information about the healthcare Party\n * @summary Get a healthcareParty by his ID\n * @param healthcarePartyId\n */\n getHealthcareParty(healthcarePartyId: string): Promise<HealthcareParty> {\n const _body = null\n\n const _url = this.host + `/rest/v2/hcparty/${encodeURIComponent(String(healthcarePartyId))}` + '?ts=' + new Date().getTime()\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the public key of a healthcare party in Hex\n * @summary Get public key of a healthcare party\n * @param healthcarePartyId\n */\n getPublicKey(healthcarePartyId: string): Promise<PublicKey> {\n const _body = null\n\n const _url = this.host + `/rest/v2/hcparty/${encodeURIComponent(String(healthcarePartyId))}/publicKey` + '?ts=' + new Date().getTime()\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => new PublicKey(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of healthcare parties.\n * @summary Find healthcare parties by name with(out) pagination\n * @param name The Last name search value\n */\n listHealthcarePartiesByName(name: string): Promise<Array<HealthcareParty>> {\n const _body = null\n\n const _url = this.host + `/rest/v2/hcparty/byNameStrict/${encodeURIComponent(String(name))}` + '?ts=' + new Date().getTime()\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthcareParty(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Return a list of children hcp.\n * @summary Find children of an healthcare parties\n * @param parentId\n */\n listHealthcarePartiesByParentId(parentId: string): Promise<Array<HealthcareParty>> {\n const _body = null\n\n const _url = this.host + `/rest/v2/hcparty/${encodeURIComponent(String(parentId))}/children` + '?ts=' + new Date().getTime()\n const headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)\n .then((doc) => (doc.body as Array<JSON>).map((it) => new HealthcareParty(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * No particular return value. It's just a message.\n * @summary Modify a Healthcare Party.\n * @param body\n */\n modifyHealthcareParty(body?: HealthcareParty): Promise<HealthcareParty> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/hcparty` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * No particular return value. It's just a message.\n * @summary Modify a Healthcare Party.\n * @param body\n * @param groupId\n */\n modifyHealthcarePartyInGroup(groupId: string, body?: HealthcareParty): Promise<HealthcareParty> {\n let _body = null\n _body = body\n\n const _url = this.host + `/rest/v2/hcparty/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)\n .then((doc) => new HealthcareParty(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|