@icure/api 8.4.1 → 8.4.2
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/Body.js +1 -1
- package/icc-api/model/Body.js.map +1 -1
- package/icc-api/model/Body3.js +1 -1
- package/icc-api/model/Body3.js.map +1 -1
- package/icc-api/model/ByteArray.js +1 -1
- package/icc-api/model/ByteArray.js.map +1 -1
- package/icc-api/model/Device.js +1 -1
- package/icc-api/model/Device.js.map +1 -1
- package/icc-api/model/Document.js +1 -1
- package/icc-api/model/Document.js.map +1 -1
- package/icc-api/model/DocumentTemplate.js +1 -1
- package/icc-api/model/DocumentTemplate.js.map +1 -1
- package/icc-api/model/FormTemplate.js +1 -1
- package/icc-api/model/FormTemplate.js.map +1 -1
- package/icc-api/model/ModelHelper.d.ts +1 -0
- package/icc-api/model/ModelHelper.js +12 -0
- package/icc-api/model/ModelHelper.js.map +1 -1
- package/icc-api/model/Patient.js +1 -9
- package/icc-api/model/Patient.js.map +1 -1
- package/package.json +1 -1
package/icc-api/model/Body.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.Body = void 0;
|
|
|
15
15
|
const ModelHelper_1 = require("./ModelHelper");
|
|
16
16
|
class Body {
|
|
17
17
|
constructor(json) {
|
|
18
|
-
Object.assign(this, json, json.attachment ? { attachment: (0, ModelHelper_1.
|
|
18
|
+
Object.assign(this, json, json.attachment ? { attachment: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.attachment) } : {});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.Body = Body;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Body.js","sourceRoot":"","sources":["../../../icc-api/model/Body.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,+
|
|
1
|
+
{"version":3,"file":"Body.js","sourceRoot":"","sources":["../../../icc-api/model/Body.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,+CAAwD;AACxD,MAAa,IAAI;IACf,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAA,uCAAyB,EAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACtH,CAAC;CAGF;AAND,oBAMC","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 */\n\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nexport class Body {\n constructor(json: JSON | any) {\n Object.assign(this as Body, json, json.attachment ? { attachment: decodeStringOrArrayBuffer(json.attachment) } : {})\n }\n\n attachment?: ArrayBuffer\n}\n"]}
|
package/icc-api/model/Body3.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.Body3 = void 0;
|
|
|
15
15
|
const ModelHelper_1 = require("./ModelHelper");
|
|
16
16
|
class Body3 {
|
|
17
17
|
constructor(json) {
|
|
18
|
-
Object.assign(this, json, json.attachment ? { attachment: (0, ModelHelper_1.
|
|
18
|
+
Object.assign(this, json, json.attachment ? { attachment: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.attachment) } : {});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.Body3 = Body3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Body3.js","sourceRoot":"","sources":["../../../icc-api/model/Body3.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,+
|
|
1
|
+
{"version":3,"file":"Body3.js","sourceRoot":"","sources":["../../../icc-api/model/Body3.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,+CAAwD;AACxD,MAAa,KAAK;IAChB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAa,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAA,uCAAyB,EAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACvH,CAAC;CAGF;AAND,sBAMC","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 */\n\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nexport class Body3 {\n constructor(json: JSON | any) {\n Object.assign(this as Body3, json, json.attachment ? { attachment: decodeStringOrArrayBuffer(json.attachment) } : {})\n }\n\n attachment?: ArrayBuffer\n}\n"]}
|
|
@@ -15,7 +15,7 @@ exports.ByteArray = void 0;
|
|
|
15
15
|
const ModelHelper_1 = require("./ModelHelper");
|
|
16
16
|
class ByteArray {
|
|
17
17
|
constructor(json) {
|
|
18
|
-
Object.assign(this, json, json.data ? { data: (0, ModelHelper_1.
|
|
18
|
+
Object.assign(this, json, json.data ? { data: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.data) } : {});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.ByteArray = ByteArray;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ByteArray.js","sourceRoot":"","sources":["../../../icc-api/model/ByteArray.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,+
|
|
1
|
+
{"version":3,"file":"ByteArray.js","sourceRoot":"","sources":["../../../icc-api/model/ByteArray.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,+CAAwD;AACxD,MAAa,SAAS;IACpB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAiB,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAA,uCAAyB,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACzG,CAAC;CAGF;AAND,8BAMC","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 */\n\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nexport class ByteArray {\n constructor(json: JSON | any) {\n Object.assign(this as ByteArray, json, json.data ? { data: decodeStringOrArrayBuffer(json.data) } : {})\n }\n\n data?: ArrayBuffer\n}\n"]}
|
package/icc-api/model/Device.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.Device = void 0;
|
|
|
7
7
|
const ModelHelper_1 = require("./ModelHelper");
|
|
8
8
|
class Device {
|
|
9
9
|
constructor(json) {
|
|
10
|
-
Object.assign(this, json, json.picture ? { picture: (0, ModelHelper_1.
|
|
10
|
+
Object.assign(this, json, json.picture ? { picture: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.picture) } : {});
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.Device = Device;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Device.js","sourceRoot":"","sources":["../../../icc-api/model/Device.ts"],"names":[],"mappings":";;;AAeA;;GAEG;AACH,+
|
|
1
|
+
{"version":3,"file":"Device.js","sourceRoot":"","sources":["../../../icc-api/model/Device.ts"],"names":[],"mappings":";;;AAeA;;GAEG;AACH,+CAAwD;AACxD,MAAa,MAAM;IACjB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAc,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAA,uCAAyB,EAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IAC/G,CAAC;CA0EF;AA7ED,wBA6EC","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 { CodeStub } from './CodeStub'\nimport { Identifier } from './Identifier'\nimport { PropertyStub } from './PropertyStub'\n\n/**\n * This entity is a root level object. It represents a device. It is serialized in JSON and saved in the underlying icure-base CouchDB database.\n */\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nexport class Device {\n constructor(json: JSON | any) {\n Object.assign(this as Device, json, json.picture ? { picture: decodeStringOrArrayBuffer(json.picture) } : {})\n }\n\n id?: string\n rev?: string\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n identifiers?: Array<Identifier>\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: number\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n externalId?: string\n name?: string\n type?: string\n brand?: string\n model?: string\n serialNumber?: string\n parentId?: string\n picture?: ArrayBuffer\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: { myPubKey1: aesExKey_for_this, delegatePubKey1: aesExKey_for_delegate } } }\n */\n aesExchangeKeys?: { [key: string]: { [key: string]: { [key: string]: 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 privateKeyShamirPartitions are used to share this device 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 device\n */\n publicKey?: string\n /**\n * The public keys of this actor that are generates using the OAEP Sha-256 standard\n */\n publicKeysForOaepWithSha256?: Array<string>\n}\n"]}
|
|
@@ -7,7 +7,7 @@ exports.Document = void 0;
|
|
|
7
7
|
const ModelHelper_1 = require("./ModelHelper");
|
|
8
8
|
class Document {
|
|
9
9
|
constructor(json) {
|
|
10
|
-
Object.assign(this, json, json.encryptedAttachment ? { encryptedAttachment: (0, ModelHelper_1.
|
|
10
|
+
Object.assign(this, json, json.encryptedAttachment ? { encryptedAttachment: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.encryptedAttachment) } : {}, json.decryptedAttachment ? { decryptedAttachment: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.decryptedAttachment) } : {});
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.Document = Document;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Document.js","sourceRoot":"","sources":["../../../icc-api/model/Document.ts"],"names":[],"mappings":";;;AAgBA;;GAEG;AACH,+CAAuC;AAGvC,MAAa,QAAQ;IACnB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CACX,IAAgB,EAChB,IAAI,EACJ,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAA,qBAAO,EAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAC1F,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAA,qBAAO,EAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAC3F,CAAA;IACH,CAAC;CA0IF;AAlJD,4BAkJC;AACD,WAAiB,QAAQ;IAEV,6BAAoB,GAAG;QAClC,KAAK,EAAE,OAA+B;QACtC,IAAI,EAAE,MAA8B;KACrC,CAAA;IAyCY,yBAAgB,GAAG;QAC9B,SAAS,EAAE,WAA+B;QAC1C,KAAK,EAAE,OAA2B;QAClC,SAAS,EAAE,YAAgC;QAC3C,YAAY,EAAE,cAAkC;QAChD,eAAe,EAAE,iBAAqC;QACtD,aAAa,EAAE,eAAmC;QAClD,KAAK,EAAE,OAA2B;QAClC,OAAO,EAAE,SAA6B;QACtC,KAAK,EAAE,OAA2B;QAClC,SAAS,EAAE,WAA+B;QAC1C,eAAe,EAAE,iBAAqC;QACtD,qBAAqB,EAAE,yBAA6C;QACpE,sBAAsB,EAAE,0BAA8C;QACtE,uBAAuB,EAAE,2BAA+C;QACxE,wBAAwB,EAAE,4BAAgD;QAC1E,qBAAqB,EAAE,yBAA6C;QACpE,YAAY,EAAE,cAAkC;QAChD,YAAY,EAAE,cAAkC;QAChD,UAAU,EAAE,YAAgC;QAC5C,SAAS,EAAE,WAA+B;QAC1C,uBAAuB,EAAE,yBAA6C;QACtE,uBAAuB,EAAE,yBAA6C;QACtE,IAAI,EAAE,MAA0B;QAChC,YAAY,EAAE,cAAkC;QAChD,0BAA0B,EAAE,4BAAgD;QAC5E,YAAY,EAAE,cAAkC;QAChD,eAAe,EAAE,iBAAqC;QACtD,oBAAoB,EAAE,sBAA0C;QAChE,2BAA2B,EAAE,6BAAiD;QAC9E,QAAQ,EAAE,UAA8B;QACxC,MAAM,EAAE,QAA4B;QACpC,OAAO,EAAE,SAA6B;QACtC,MAAM,EAAE,QAA4B;QACpC,MAAM,EAAE,QAA4B;QACpC,cAAc,EAAE,gBAAoC;QACpD,QAAQ,EAAE,UAA8B;QACxC,aAAa,EAAE,gBAAoC;QACnD,mBAAmB,EAAE,qBAAyC;QAC9D,WAAW,EAAE,aAAiC;KAC/C,CAAA;IAWY,2BAAkB,GAAG;QAChC,KAAK,EAAE,OAA6B;QACpC,SAAS,EAAE,WAAiC;QAC5C,aAAa,EAAE,gBAAsC;QACrD,QAAQ,EAAE,UAAgC;QAC1C,gBAAgB,EAAE,mBAAyC;QAC3D,MAAM,EAAE,QAA8B;QACtC,QAAQ,EAAE,UAAgC;QAC1C,IAAI,EAAE,MAA4B;QAClC,SAAS,EAAE,WAAiC;KAC7C,CAAA;AACH,CAAC,EA5GgB,QAAQ,wBAAR,QAAQ,QA4GxB","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 { CodeStub } from './CodeStub'\nimport { Delegation } from './Delegation'\nimport { DataAttachment } from './DataAttachment'\nimport { DeletedAttachment } from './DeletedAttachment'\n\n/**\n * This entity is a root level object. It represents a Document. It is serialized in JSON and saved in the underlying CouchDB database.\n */\nimport { b64_2ab } from './ModelHelper'\nimport { SecurityMetadata } from './SecurityMetadata'\nimport { EntityWithDelegationTypeName } from '../../icc-x-api/utils/EntityWithDelegationTypeName'\nexport class Document {\n constructor(json: JSON | any) {\n Object.assign(\n this as Document,\n json,\n json.encryptedAttachment ? { encryptedAttachment: b64_2ab(json.encryptedAttachment) } : {},\n json.decryptedAttachment ? { decryptedAttachment: b64_2ab(json.decryptedAttachment) } : {}\n )\n }\n\n /**\n * The Id of the document. We encourage using either a v4 UUID or a HL7 Id.\n */\n id?: string\n /**\n * The revision of the document in the database, used for conflict management / optimistic locking.\n */\n rev?: string\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: 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 * Location of the document\n */\n documentLocation?: Document.DocumentLocationEnum\n /**\n * The type of document, ex: admission, clinical path, document report,invoice, etc.\n */\n documentType?: Document.DocumentTypeEnum\n /**\n * The status of the development of the document. Ex: Draft, finalized, reviewed, signed, etc.\n */\n documentStatus?: Document.DocumentStatusEnum\n /**\n * When the document is stored in an external repository, this is the uri of the document in that repository\n */\n externalUri?: string\n /**\n * Name of the document\n */\n name?: string\n /**\n * The document version\n */\n version?: string\n /**\n * The ICureDocument (Form, Contact, ...) that has been used to generate the document\n */\n storedICureDocumentId?: string\n /**\n * A unique external id (from another external source).\n */\n externalUuid?: string\n /**\n * Size of the document file\n */\n size?: number\n /**\n * Hashed version of the document\n */\n hash?: string\n /**\n * Id of the contact during which the document was created\n */\n openingContactId?: string\n /**\n * Id of the main attachment of this document, if stored as a couchdb attachment\n */\n attachmentId?: string\n /**\n * Id of the main attachment of this document, if stored using the object storage service\n */\n objectStoreReference?: string\n /**\n * The main Uniform Type Identifier for the main attachment (https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE)\n */\n mainUti?: string\n /**\n * Extra Uniform Type Identifiers for the main attachment\n */\n otherUtis?: Array<string>\n /**\n * Secondary attachments for this document\n */\n secondaryAttachments?: { [key: string]: DataAttachment }\n /**\n * Information on past attachments for this document\n */\n deletedAttachments?: Array<DeletedAttachment>\n encryptedAttachment?: ArrayBuffer\n decryptedAttachment?: ArrayBuffer\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.\n */\n secretForeignKeys?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.\n */\n cryptedForeignKeys?: { [key: string]: Array<Delegation> }\n /**\n * When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well\n */\n delegations?: { [key: string]: Array<Delegation> }\n /**\n * When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation\n */\n encryptionKeys?: { [key: string]: Array<Delegation> }\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n securityMetadata?: SecurityMetadata\n \n}\nexport namespace Document {\n export type DocumentLocationEnum = 'annex' | 'body'\n export const DocumentLocationEnum = {\n Annex: 'annex' as DocumentLocationEnum,\n Body: 'body' as DocumentLocationEnum,\n }\n export type DocumentTypeEnum =\n | 'admission'\n | 'alert'\n | 'bvt_sample'\n | 'clinicalpath'\n | 'clinicalsummary'\n | 'contactreport'\n | 'quote'\n | 'invoice'\n | 'death'\n | 'discharge'\n | 'dischargereport'\n | 'ebirth_baby_medicalform'\n | 'ebirth_baby_notification'\n | 'ebirth_mother_medicalform'\n | 'ebirth_mother_notification'\n | 'ecare_safe_consultation'\n | 'epidemiology'\n | 'intervention'\n | 'labrequest'\n | 'labresult'\n | 'medicaladvisoragreement'\n | 'medicationschemeelement'\n | 'note'\n | 'notification'\n | 'pharmaceuticalprescription'\n | 'prescription'\n | 'productdelivery'\n | 'quickdischargereport'\n | 'radiationexposuremonitoring'\n | 'referral'\n | 'report'\n | 'request'\n | 'result'\n | 'sumehr'\n | 'telemonitoring'\n | 'template'\n | 'template_admin'\n | 'treatmentsuspension'\n | 'vaccination'\n export const DocumentTypeEnum = {\n Admission: 'admission' as DocumentTypeEnum,\n Alert: 'alert' as DocumentTypeEnum,\n BvtSample: 'bvt_sample' as DocumentTypeEnum,\n Clinicalpath: 'clinicalpath' as DocumentTypeEnum,\n Clinicalsummary: 'clinicalsummary' as DocumentTypeEnum,\n Contactreport: 'contactreport' as DocumentTypeEnum,\n Quote: 'quote' as DocumentTypeEnum,\n Invoice: 'invoice' as DocumentTypeEnum,\n Death: 'death' as DocumentTypeEnum,\n Discharge: 'discharge' as DocumentTypeEnum,\n Dischargereport: 'dischargereport' as DocumentTypeEnum,\n EbirthBabyMedicalform: 'ebirth_baby_medicalform' as DocumentTypeEnum,\n EbirthBabyNotification: 'ebirth_baby_notification' as DocumentTypeEnum,\n EbirthMotherMedicalform: 'ebirth_mother_medicalform' as DocumentTypeEnum,\n EbirthMotherNotification: 'ebirth_mother_notification' as DocumentTypeEnum,\n EcareSafeConsultation: 'ecare_safe_consultation' as DocumentTypeEnum,\n Epidemiology: 'epidemiology' as DocumentTypeEnum,\n Intervention: 'intervention' as DocumentTypeEnum,\n Labrequest: 'labrequest' as DocumentTypeEnum,\n Labresult: 'labresult' as DocumentTypeEnum,\n Medicaladvisoragreement: 'medicaladvisoragreement' as DocumentTypeEnum,\n Medicationschemeelement: 'medicationschemeelement' as DocumentTypeEnum,\n Note: 'note' as DocumentTypeEnum,\n Notification: 'notification' as DocumentTypeEnum,\n Pharmaceuticalprescription: 'pharmaceuticalprescription' as DocumentTypeEnum,\n Prescription: 'prescription' as DocumentTypeEnum,\n Productdelivery: 'productdelivery' as DocumentTypeEnum,\n Quickdischargereport: 'quickdischargereport' as DocumentTypeEnum,\n Radiationexposuremonitoring: 'radiationexposuremonitoring' as DocumentTypeEnum,\n Referral: 'referral' as DocumentTypeEnum,\n Report: 'report' as DocumentTypeEnum,\n Request: 'request' as DocumentTypeEnum,\n Result: 'result' as DocumentTypeEnum,\n Sumehr: 'sumehr' as DocumentTypeEnum,\n Telemonitoring: 'telemonitoring' as DocumentTypeEnum,\n Template: 'template' as DocumentTypeEnum,\n TemplateAdmin: 'template_admin' as DocumentTypeEnum,\n Treatmentsuspension: 'treatmentsuspension' as DocumentTypeEnum,\n Vaccination: 'vaccination' as DocumentTypeEnum,\n }\n export type DocumentStatusEnum =\n | 'draft'\n | 'finalized'\n | 'pending_review'\n | 'reviewed'\n | 'pending_signature'\n | 'signed'\n | 'canceled'\n | 'sent'\n | 'delivered'\n export const DocumentStatusEnum = {\n Draft: 'draft' as DocumentStatusEnum,\n Finalized: 'finalized' as DocumentStatusEnum,\n PendingReview: 'pending_review' as DocumentStatusEnum,\n Reviewed: 'reviewed' as DocumentStatusEnum,\n PendingSignature: 'pending_signature' as DocumentStatusEnum,\n Signed: 'signed' as DocumentStatusEnum,\n Canceled: 'canceled' as DocumentStatusEnum,\n Sent: 'sent' as DocumentStatusEnum,\n Delivered: 'delivered' as DocumentStatusEnum,\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Document.js","sourceRoot":"","sources":["../../../icc-api/model/Document.ts"],"names":[],"mappings":";;;AAgBA;;GAEG;AACH,+CAAwD;AAGxD,MAAa,QAAQ;IACnB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CACX,IAAgB,EAChB,IAAI,EACJ,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAA,uCAAyB,EAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAC5G,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAA,uCAAyB,EAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAC7G,CAAA;IACH,CAAC;CA0IF;AAlJD,4BAkJC;AACD,WAAiB,QAAQ;IAEV,6BAAoB,GAAG;QAClC,KAAK,EAAE,OAA+B;QACtC,IAAI,EAAE,MAA8B;KACrC,CAAA;IAyCY,yBAAgB,GAAG;QAC9B,SAAS,EAAE,WAA+B;QAC1C,KAAK,EAAE,OAA2B;QAClC,SAAS,EAAE,YAAgC;QAC3C,YAAY,EAAE,cAAkC;QAChD,eAAe,EAAE,iBAAqC;QACtD,aAAa,EAAE,eAAmC;QAClD,KAAK,EAAE,OAA2B;QAClC,OAAO,EAAE,SA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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 { CodeStub } from './CodeStub'\nimport { Delegation } from './Delegation'\nimport { DataAttachment } from './DataAttachment'\nimport { DeletedAttachment } from './DeletedAttachment'\n\n/**\n * This entity is a root level object. It represents a Document. It is serialized in JSON and saved in the underlying CouchDB database.\n */\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nimport { SecurityMetadata } from './SecurityMetadata'\nimport { EntityWithDelegationTypeName } from '../../icc-x-api/utils/EntityWithDelegationTypeName'\nexport class Document {\n constructor(json: JSON | any) {\n Object.assign(\n this as Document,\n json,\n json.encryptedAttachment ? { encryptedAttachment: decodeStringOrArrayBuffer(json.encryptedAttachment) } : {},\n json.decryptedAttachment ? { decryptedAttachment: decodeStringOrArrayBuffer(json.decryptedAttachment) } : {}\n )\n }\n\n /**\n * The Id of the document. We encourage using either a v4 UUID or a HL7 Id.\n */\n id?: string\n /**\n * The revision of the document in the database, used for conflict management / optimistic locking.\n */\n rev?: string\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: 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 * Location of the document\n */\n documentLocation?: Document.DocumentLocationEnum\n /**\n * The type of document, ex: admission, clinical path, document report,invoice, etc.\n */\n documentType?: Document.DocumentTypeEnum\n /**\n * The status of the development of the document. Ex: Draft, finalized, reviewed, signed, etc.\n */\n documentStatus?: Document.DocumentStatusEnum\n /**\n * When the document is stored in an external repository, this is the uri of the document in that repository\n */\n externalUri?: string\n /**\n * Name of the document\n */\n name?: string\n /**\n * The document version\n */\n version?: string\n /**\n * The ICureDocument (Form, Contact, ...) that has been used to generate the document\n */\n storedICureDocumentId?: string\n /**\n * A unique external id (from another external source).\n */\n externalUuid?: string\n /**\n * Size of the document file\n */\n size?: number\n /**\n * Hashed version of the document\n */\n hash?: string\n /**\n * Id of the contact during which the document was created\n */\n openingContactId?: string\n /**\n * Id of the main attachment of this document, if stored as a couchdb attachment\n */\n attachmentId?: string\n /**\n * Id of the main attachment of this document, if stored using the object storage service\n */\n objectStoreReference?: string\n /**\n * The main Uniform Type Identifier for the main attachment (https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE)\n */\n mainUti?: string\n /**\n * Extra Uniform Type Identifiers for the main attachment\n */\n otherUtis?: Array<string>\n /**\n * Secondary attachments for this document\n */\n secondaryAttachments?: { [key: string]: DataAttachment }\n /**\n * Information on past attachments for this document\n */\n deletedAttachments?: Array<DeletedAttachment>\n encryptedAttachment?: ArrayBuffer\n decryptedAttachment?: ArrayBuffer\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.\n */\n secretForeignKeys?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.\n */\n cryptedForeignKeys?: { [key: string]: Array<Delegation> }\n /**\n * When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well\n */\n delegations?: { [key: string]: Array<Delegation> }\n /**\n * When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation\n */\n encryptionKeys?: { [key: string]: Array<Delegation> }\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n securityMetadata?: SecurityMetadata\n\n}\nexport namespace Document {\n export type DocumentLocationEnum = 'annex' | 'body'\n export const DocumentLocationEnum = {\n Annex: 'annex' as DocumentLocationEnum,\n Body: 'body' as DocumentLocationEnum,\n }\n export type DocumentTypeEnum =\n | 'admission'\n | 'alert'\n | 'bvt_sample'\n | 'clinicalpath'\n | 'clinicalsummary'\n | 'contactreport'\n | 'quote'\n | 'invoice'\n | 'death'\n | 'discharge'\n | 'dischargereport'\n | 'ebirth_baby_medicalform'\n | 'ebirth_baby_notification'\n | 'ebirth_mother_medicalform'\n | 'ebirth_mother_notification'\n | 'ecare_safe_consultation'\n | 'epidemiology'\n | 'intervention'\n | 'labrequest'\n | 'labresult'\n | 'medicaladvisoragreement'\n | 'medicationschemeelement'\n | 'note'\n | 'notification'\n | 'pharmaceuticalprescription'\n | 'prescription'\n | 'productdelivery'\n | 'quickdischargereport'\n | 'radiationexposuremonitoring'\n | 'referral'\n | 'report'\n | 'request'\n | 'result'\n | 'sumehr'\n | 'telemonitoring'\n | 'template'\n | 'template_admin'\n | 'treatmentsuspension'\n | 'vaccination'\n export const DocumentTypeEnum = {\n Admission: 'admission' as DocumentTypeEnum,\n Alert: 'alert' as DocumentTypeEnum,\n BvtSample: 'bvt_sample' as DocumentTypeEnum,\n Clinicalpath: 'clinicalpath' as DocumentTypeEnum,\n Clinicalsummary: 'clinicalsummary' as DocumentTypeEnum,\n Contactreport: 'contactreport' as DocumentTypeEnum,\n Quote: 'quote' as DocumentTypeEnum,\n Invoice: 'invoice' as DocumentTypeEnum,\n Death: 'death' as DocumentTypeEnum,\n Discharge: 'discharge' as DocumentTypeEnum,\n Dischargereport: 'dischargereport' as DocumentTypeEnum,\n EbirthBabyMedicalform: 'ebirth_baby_medicalform' as DocumentTypeEnum,\n EbirthBabyNotification: 'ebirth_baby_notification' as DocumentTypeEnum,\n EbirthMotherMedicalform: 'ebirth_mother_medicalform' as DocumentTypeEnum,\n EbirthMotherNotification: 'ebirth_mother_notification' as DocumentTypeEnum,\n EcareSafeConsultation: 'ecare_safe_consultation' as DocumentTypeEnum,\n Epidemiology: 'epidemiology' as DocumentTypeEnum,\n Intervention: 'intervention' as DocumentTypeEnum,\n Labrequest: 'labrequest' as DocumentTypeEnum,\n Labresult: 'labresult' as DocumentTypeEnum,\n Medicaladvisoragreement: 'medicaladvisoragreement' as DocumentTypeEnum,\n Medicationschemeelement: 'medicationschemeelement' as DocumentTypeEnum,\n Note: 'note' as DocumentTypeEnum,\n Notification: 'notification' as DocumentTypeEnum,\n Pharmaceuticalprescription: 'pharmaceuticalprescription' as DocumentTypeEnum,\n Prescription: 'prescription' as DocumentTypeEnum,\n Productdelivery: 'productdelivery' as DocumentTypeEnum,\n Quickdischargereport: 'quickdischargereport' as DocumentTypeEnum,\n Radiationexposuremonitoring: 'radiationexposuremonitoring' as DocumentTypeEnum,\n Referral: 'referral' as DocumentTypeEnum,\n Report: 'report' as DocumentTypeEnum,\n Request: 'request' as DocumentTypeEnum,\n Result: 'result' as DocumentTypeEnum,\n Sumehr: 'sumehr' as DocumentTypeEnum,\n Telemonitoring: 'telemonitoring' as DocumentTypeEnum,\n Template: 'template' as DocumentTypeEnum,\n TemplateAdmin: 'template_admin' as DocumentTypeEnum,\n Treatmentsuspension: 'treatmentsuspension' as DocumentTypeEnum,\n Vaccination: 'vaccination' as DocumentTypeEnum,\n }\n export type DocumentStatusEnum =\n | 'draft'\n | 'finalized'\n | 'pending_review'\n | 'reviewed'\n | 'pending_signature'\n | 'signed'\n | 'canceled'\n | 'sent'\n | 'delivered'\n export const DocumentStatusEnum = {\n Draft: 'draft' as DocumentStatusEnum,\n Finalized: 'finalized' as DocumentStatusEnum,\n PendingReview: 'pending_review' as DocumentStatusEnum,\n Reviewed: 'reviewed' as DocumentStatusEnum,\n PendingSignature: 'pending_signature' as DocumentStatusEnum,\n Signed: 'signed' as DocumentStatusEnum,\n Canceled: 'canceled' as DocumentStatusEnum,\n Sent: 'sent' as DocumentStatusEnum,\n Delivered: 'delivered' as DocumentStatusEnum,\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ exports.DocumentTemplate = void 0;
|
|
|
4
4
|
const ModelHelper_1 = require("./ModelHelper");
|
|
5
5
|
class DocumentTemplate {
|
|
6
6
|
constructor(json) {
|
|
7
|
-
Object.assign(this, json, json.attachment ? { attachment: (0, ModelHelper_1.
|
|
7
|
+
Object.assign(this, json, json.attachment ? { attachment: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.attachment) } : {});
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.DocumentTemplate = DocumentTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentTemplate.js","sourceRoot":"","sources":["../../../icc-api/model/DocumentTemplate.ts"],"names":[],"mappings":";;;AAcA,+
|
|
1
|
+
{"version":3,"file":"DocumentTemplate.js","sourceRoot":"","sources":["../../../icc-api/model/DocumentTemplate.ts"],"names":[],"mappings":";;;AAcA,+CAAwD;AACxD,MAAa,gBAAgB;IAC3B,YAAY,IAAgB;QAC1B,MAAM,CA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a,EAAE,gBAAoC;QACnD,mBAAmB,EAAE,qBAAyC;QAC9D,WAAW,EAAE,aAAiC;KAC/C,CAAA;IAEY,4BAAW,GAAG;QACzB,EAAE,EAAE,QAAuB;KAC5B,CAAA;AACH,CAAC,EAtFgB,gBAAgB,gCAAhB,gBAAgB,QAsFhC","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 { CodeStub } from './CodeStub'\nimport { DocumentGroup } from './DocumentGroup'\n\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nexport class DocumentTemplate {\n constructor(json: JSON | any) {\n Object.assign(this as DocumentTemplate, json, json.attachment ? { attachment: decodeStringOrArrayBuffer(json.attachment) } : {})\n }\n\n id?: string\n rev?: string\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: number\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n attachment?: ArrayBuffer\n /**\n * The type of document, ex: admission, clinical path, document report,invoice, etc.\n */\n documentType?: DocumentTemplate.DocumentTypeEnum\n mainUti?: string\n name?: string\n otherUtis?: Array<string>\n attachmentId?: string\n version?: DocumentTemplate.VersionEnum\n owner?: string\n guid?: string\n group?: DocumentGroup\n descr?: string\n disabled?: string\n specialty?: CodeStub\n}\nexport namespace DocumentTemplate {\n export type DocumentTypeEnum =\n | 'admission'\n | 'alert'\n | 'bvt_sample'\n | 'clinicalpath'\n | 'clinicalsummary'\n | 'contactreport'\n | 'quote'\n | 'invoice'\n | 'death'\n | 'discharge'\n | 'dischargereport'\n | 'ebirth_baby_medicalform'\n | 'ebirth_baby_notification'\n | 'ebirth_mother_medicalform'\n | 'ebirth_mother_notification'\n | 'ecare_safe_consultation'\n | 'epidemiology'\n | 'intervention'\n | 'labrequest'\n | 'labresult'\n | 'medicaladvisoragreement'\n | 'medicationschemeelement'\n | 'note'\n | 'notification'\n | 'pharmaceuticalprescription'\n | 'prescription'\n | 'productdelivery'\n | 'quickdischargereport'\n | 'radiationexposuremonitoring'\n | 'referral'\n | 'report'\n | 'request'\n | 'result'\n | 'sumehr'\n | 'telemonitoring'\n | 'template'\n | 'template_admin'\n | 'treatmentsuspension'\n | 'vaccination'\n export const DocumentTypeEnum = {\n Admission: 'admission' as DocumentTypeEnum,\n Alert: 'alert' as DocumentTypeEnum,\n BvtSample: 'bvt_sample' as DocumentTypeEnum,\n Clinicalpath: 'clinicalpath' as DocumentTypeEnum,\n Clinicalsummary: 'clinicalsummary' as DocumentTypeEnum,\n Contactreport: 'contactreport' as DocumentTypeEnum,\n Quote: 'quote' as DocumentTypeEnum,\n Invoice: 'invoice' as DocumentTypeEnum,\n Death: 'death' as DocumentTypeEnum,\n Discharge: 'discharge' as DocumentTypeEnum,\n Dischargereport: 'dischargereport' as DocumentTypeEnum,\n EbirthBabyMedicalform: 'ebirth_baby_medicalform' as DocumentTypeEnum,\n EbirthBabyNotification: 'ebirth_baby_notification' as DocumentTypeEnum,\n EbirthMotherMedicalform: 'ebirth_mother_medicalform' as DocumentTypeEnum,\n EbirthMotherNotification: 'ebirth_mother_notification' as DocumentTypeEnum,\n EcareSafeConsultation: 'ecare_safe_consultation' as DocumentTypeEnum,\n Epidemiology: 'epidemiology' as DocumentTypeEnum,\n Intervention: 'intervention' as DocumentTypeEnum,\n Labrequest: 'labrequest' as DocumentTypeEnum,\n Labresult: 'labresult' as DocumentTypeEnum,\n Medicaladvisoragreement: 'medicaladvisoragreement' as DocumentTypeEnum,\n Medicationschemeelement: 'medicationschemeelement' as DocumentTypeEnum,\n Note: 'note' as DocumentTypeEnum,\n Notification: 'notification' as DocumentTypeEnum,\n Pharmaceuticalprescription: 'pharmaceuticalprescription' as DocumentTypeEnum,\n Prescription: 'prescription' as DocumentTypeEnum,\n Productdelivery: 'productdelivery' as DocumentTypeEnum,\n Quickdischargereport: 'quickdischargereport' as DocumentTypeEnum,\n Radiationexposuremonitoring: 'radiationexposuremonitoring' as DocumentTypeEnum,\n Referral: 'referral' as DocumentTypeEnum,\n Report: 'report' as DocumentTypeEnum,\n Request: 'request' as DocumentTypeEnum,\n Result: 'result' as DocumentTypeEnum,\n Sumehr: 'sumehr' as DocumentTypeEnum,\n Telemonitoring: 'telemonitoring' as DocumentTypeEnum,\n Template: 'template' as DocumentTypeEnum,\n TemplateAdmin: 'template_admin' as DocumentTypeEnum,\n Treatmentsuspension: 'treatmentsuspension' as DocumentTypeEnum,\n Vaccination: 'vaccination' as DocumentTypeEnum,\n }\n export type VersionEnum = 'V1_0_0'\n export const VersionEnum = {\n _0: 'V1_0_0' as VersionEnum,\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ exports.FormTemplate = void 0;
|
|
|
4
4
|
const ModelHelper_1 = require("./ModelHelper");
|
|
5
5
|
class FormTemplate {
|
|
6
6
|
constructor(json) {
|
|
7
|
-
Object.assign(this, json, json.rawTemplateLayout ? { rawTemplateLayout: (0, ModelHelper_1.
|
|
7
|
+
Object.assign(this, json, json.rawTemplateLayout ? { rawTemplateLayout: (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.rawTemplateLayout) } : {});
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.FormTemplate = FormTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormTemplate.js","sourceRoot":"","sources":["../../../icc-api/model/FormTemplate.ts"],"names":[],"mappings":";;;AAgBA,+
|
|
1
|
+
{"version":3,"file":"FormTemplate.js","sourceRoot":"","sources":["../../../icc-api/model/FormTemplate.ts"],"names":[],"mappings":";;;AAgBA,+CAAwD;AACxD,MAAa,YAAY;IACvB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAoB,EAAE,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAA,uCAAyB,EAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACnJ,CAAC;CA2BF;AA9BD,oCA8BC","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 { CodeStub } from './CodeStub'\nimport { DocumentGroup } from './DocumentGroup'\nimport { FormLayout } from './FormLayout'\nimport { FormTemplateLayout } from './FormTemplateLayout'\n\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nexport class FormTemplate {\n constructor(json: JSON | any) {\n Object.assign(this as FormTemplate, json, json.rawTemplateLayout ? { rawTemplateLayout: decodeStringOrArrayBuffer(json.rawTemplateLayout) } : {})\n }\n\n id?: string\n rev?: string\n /**\n * hard delete (unix epoch in ms) timestamp of the object\n */\n deletionDate?: number\n layout?: FormLayout\n templateLayout?: FormTemplateLayout\n rawTemplateLayout?: ArrayBuffer\n name?: string\n guid?: string\n group?: DocumentGroup\n descr?: string\n disabled?: string\n specialty?: CodeStub\n author?: string\n formInstancePreferredLocation?: string\n keyboardShortcut?: string\n shortReport?: string\n mediumReport?: string\n longReport?: string\n reports?: Array<string>\n tags?: Array<CodeStub>\n layoutAttachmentId?: string\n templateLayoutAttachmentId?: string\n}\n"]}
|
|
@@ -2,6 +2,7 @@ export declare function ua2string(_ua: Uint8Array | ArrayBuffer): string;
|
|
|
2
2
|
export declare function string2ua(s: string): Uint8Array;
|
|
3
3
|
export declare function string2ab(s: string): ArrayBuffer;
|
|
4
4
|
export declare function ua2ab(ua: Uint8Array): ArrayBuffer;
|
|
5
|
+
export declare function decodeStringOrArrayBuffer(value: string | ArrayBuffer): ArrayBuffer;
|
|
5
6
|
export declare function b64_2ab(s: string): ArrayBuffer;
|
|
6
7
|
export declare function b64_2ua(s: string): Uint8Array;
|
|
7
8
|
export declare function ua2b64(_ua: Uint8Array | ArrayBuffer): string;
|
|
@@ -4,6 +4,7 @@ exports.ua2string = ua2string;
|
|
|
4
4
|
exports.string2ua = string2ua;
|
|
5
5
|
exports.string2ab = string2ab;
|
|
6
6
|
exports.ua2ab = ua2ab;
|
|
7
|
+
exports.decodeStringOrArrayBuffer = decodeStringOrArrayBuffer;
|
|
7
8
|
exports.b64_2ab = b64_2ab;
|
|
8
9
|
exports.b64_2ua = b64_2ua;
|
|
9
10
|
exports.ua2b64 = ua2b64;
|
|
@@ -36,6 +37,17 @@ function ua2ab(ua) {
|
|
|
36
37
|
const buffer = ua.buffer;
|
|
37
38
|
return (buffer.byteLength > ua.byteLength ? buffer.slice(0, ua.byteLength) : buffer);
|
|
38
39
|
}
|
|
40
|
+
function decodeStringOrArrayBuffer(value) {
|
|
41
|
+
if (typeof value === 'string') {
|
|
42
|
+
return b64_2ab(value);
|
|
43
|
+
}
|
|
44
|
+
else if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
throw new Error(`Invalid type : ${typeof value}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
39
51
|
function b64_2ab(s) {
|
|
40
52
|
return ua2ab(string2ua(a2b(s)));
|
|
41
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelHelper.js","sourceRoot":"","sources":["../../../icc-api/model/ModelHelper.ts"],"names":[],"mappings":";;AAAA,8BAYC;AAED,8BAMC;AAED,8BAEC;AAED,sBAGC;AAED,0BAEC;AAED,0BAEC;AAED,wBAEC;AAED,kBAoBC;AAED,kBAqBC;
|
|
1
|
+
{"version":3,"file":"ModelHelper.js","sourceRoot":"","sources":["../../../icc-api/model/ModelHelper.ts"],"names":[],"mappings":";;AAAA,8BAYC;AAED,8BAMC;AAED,8BAEC;AAED,sBAGC;AAED,8DAQC;AAED,0BAEC;AAED,0BAEC;AAED,wBAEC;AAED,kBAoBC;AAED,kBAqBC;AAhGD,SAAgB,SAAS,CAAC,GAA6B;IACrD,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAA;IAC9B,MAAM,KAAK,GAAG,EAAE,CAAC,MAAM,CAAA;IACvB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACjC,IAAI,MAAM,EAAE,GAAG,EAAE,KAAK,CAAA;IACtB,KAAK,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,CAAC;QACtD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,GAAG,MAAM,CAAC,CAAA;QAC1C,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,CAAA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AC,CAAA;IAC/D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,wBAAwB;QACxB,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,eAAe,CAAC,CAAA;QAC9B,CAAC;QACD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;YACjD,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC/B,CAAC;IACH,CAAC;SAAM,CAAC;QACN,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;YACjD,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC/B,CAAC;QACD,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,eAAe,CAAC,CAAA;QAC9B,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;AAC9C,CAAC","sourcesContent":["export function ua2string(_ua: Uint8Array | ArrayBuffer): string {\n let str = ''\n const ab = new Uint8Array(_ua)\n const abLen = ab.length\n const CHUNK_SIZE = Math.pow(2, 8)\n let offset, len, subab\n for (offset = 0; offset < abLen; offset += CHUNK_SIZE) {\n len = Math.min(CHUNK_SIZE, abLen - offset)\n subab = ab.subarray(offset, offset + len)\n str += String.fromCharCode.apply(null, subab as any)\n }\n return str\n}\n\nexport function string2ua(s: string): Uint8Array {\n const ua = new Uint8Array(s.length)\n for (let i = 0; i < s.length; i++) {\n ua[i] = s.charCodeAt(i) & 0xff\n }\n return ua\n}\n\nexport function string2ab(s: string): ArrayBuffer {\n return ua2ab(string2ua(s))\n}\n\nexport function ua2ab(ua: Uint8Array): ArrayBuffer {\n const buffer = ua.buffer\n return (buffer.byteLength > ua.byteLength ? buffer.slice(0, ua.byteLength) : buffer) as ArrayBuffer\n}\n\nexport function decodeStringOrArrayBuffer(value: string | ArrayBuffer): ArrayBuffer {\n if (typeof value === 'string') {\n return b64_2ab(value)\n } else if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {\n return value as ArrayBuffer\n } else {\n throw new Error(`Invalid type : ${typeof value}`)\n }\n}\n\nexport function b64_2ab(s: string): ArrayBuffer {\n return ua2ab(string2ua(a2b(s)))\n}\n\nexport function b64_2ua(s: string): Uint8Array {\n return string2ua(a2b(s))\n}\n\nexport function ua2b64(_ua: Uint8Array | ArrayBuffer): string {\n return b2a(ua2string(_ua))\n}\n\nexport function b2a(a: string): string {\n if (typeof window !== 'undefined') {\n //Favour btoa in browser\n if (typeof btoa !== 'undefined') {\n return btoa(a)\n }\n if (typeof Buffer !== 'undefined') {\n const buf = Buffer.from(a, 'latin1')\n return buf.toString('base64')\n }\n } else {\n if (typeof Buffer !== 'undefined') {\n const buf = Buffer.from(a, 'latin1')\n return buf.toString('base64')\n }\n if (typeof btoa !== 'undefined') {\n return btoa(a)\n }\n }\n throw new Error('Unsupported operation b2a')\n}\n\nexport function a2b(s: string): string {\n const urlUnsafeString = s.replace(/_/g, '/').replace(/-/g, '+')\n if (typeof window !== 'undefined') {\n //Favour atob in browser\n if (typeof atob !== 'undefined') {\n return atob(urlUnsafeString)\n }\n if (typeof Buffer !== 'undefined') {\n const buf = new Buffer(urlUnsafeString, 'base64')\n return buf.toString('latin1')\n }\n } else {\n if (typeof Buffer !== 'undefined') {\n const buf = new Buffer(urlUnsafeString, 'base64')\n return buf.toString('latin1')\n }\n if (typeof atob !== 'undefined') {\n return atob(urlUnsafeString)\n }\n }\n throw new Error('Unsupported operation a2b')\n}\n"]}
|
package/icc-api/model/Patient.js
CHANGED
|
@@ -9,15 +9,7 @@ class Patient {
|
|
|
9
9
|
constructor(json) {
|
|
10
10
|
let pictureData = {};
|
|
11
11
|
if (!!(json === null || json === void 0 ? void 0 : json.picture)) {
|
|
12
|
-
|
|
13
|
-
pictureData.picture = (0, ModelHelper_1.b64_2ab)(json.picture);
|
|
14
|
-
}
|
|
15
|
-
else if (json.picture instanceof ArrayBuffer || ArrayBuffer.isView(json.picture)) {
|
|
16
|
-
pictureData.picture = json.picture;
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error(`Invalid type for picture: ${typeof json.picture}`);
|
|
20
|
-
}
|
|
12
|
+
pictureData.picture = (0, ModelHelper_1.decodeStringOrArrayBuffer)(json.picture);
|
|
21
13
|
}
|
|
22
14
|
Object.assign(this, json, pictureData);
|
|
23
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Patient.js","sourceRoot":"","sources":["../../../icc-api/model/Patient.ts"],"names":[],"mappings":";;;AA0BA;;GAEG;AACH,+CAAuC;AAGvC,MAAa,OAAO;IAClB,YAAY,IAAgB;QAC1B,IAAI,WAAW,GAA8B,EAAE,CAAA;QAC/C,IAAI,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAA,EAAE,CAAC;YACpB,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;gBACrC,WAAW,CAAC,OAAO,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAC7C,CAAC;iBAAM,IAAI,IAAI,CAAC,OAAO,YAAY,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnF,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;YACpC,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,6BAA6B,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;YACrE,CAAC;QACH,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,IAAe,EAAE,IAAI,EAAE,WAAW,CAAC,CAAA;IACnD,CAAC;CA8RF;AA3SD,0BA2SC;AACD,WAAiB,OAAO;IAET,kBAAU,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,oBAAY,GAAG;QAC1B,IAAI,EAAE,MAAsB;QAC5B,MAAM,EAAE,QAAwB;QAChC,aAAa,EAAE,eAA+B;QAC9C,OAAO,EAAE,SAAyB;QAClC,aAAa,EAAE,eAA+B;QAC9C,eAAe,EAAE,iBAAiC;QAClD,OAAO,EAAE,SAAyB;KACnC,CAAA;IAEY,8BAAsB,GAAG;QACpC,QAAQ,EAAE,UAAoC;QAC9C,KAAK,EAAE,OAAiC;QACxC,WAAW,EAAE,cAAwC;QACrD,OAAO,EAAE,SAAmC;QAC5C,SAAS,EAAE,YAAsC;QACjD,OAAO,EAAE,SAAmC;QAC5C,IAAI,EAAE,MAAgC;KACvC,CAAA;IAgBY,0BAAkB,GAAG;QAChC,MAAM,EAAE,QAA8B;QACtC,QAAQ,EAAE,WAAiC;QAC3C,OAAO,EAAE,SAA+B;QACxC,SAAS,EAAE,WAAiC;QAC5C,QAAQ,EAAE,UAAgC;QAC1C,SAAS,EAAE,WAAiC;QAC5C,OAAO,EAAE,SAA+B;QACxC,OAAO,EAAE,SAA+B;QACxC,WAAW,EAAE,aAAmC;QAChD,OAAO,EAAE,SAA+B;QACxC,QAAQ,EAAE,UAAgC;QAC1C,KAAK,EAAE,OAA6B;QACpC,QAAQ,EAAE,UAAgC;QAC1C,UAAU,EAAE,YAAkC;KAC/C,CAAA;AACH,CAAC,EA9DgB,OAAO,uBAAP,OAAO,QA8DvB","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 { Delegation } from './Delegation'\nimport { EmploymentInfo } from './EmploymentInfo'\nimport { FinancialInstitutionInformation } from './FinancialInstitutionInformation'\nimport { Identifier } from './Identifier'\nimport { Insurability } from './Insurability'\nimport { MedicalHouseContract } from './MedicalHouseContract'\nimport { Partnership } from './Partnership'\nimport { PatientHealthCareParty } from './PatientHealthCareParty'\nimport { PersonName } from './PersonName'\nimport { PropertyStub } from './PropertyStub'\nimport { SchoolingInfo } from './SchoolingInfo'\nimport { Annotation } from './Annotation'\n\n/**\n * This entity is a root level object. It represents a patient It is serialized in JSON and saved in the underlying icure-patient CouchDB database.\n */\nimport { b64_2ab } from './ModelHelper'\nimport { SecurityMetadata } from './SecurityMetadata'\nimport { EntityWithDelegationTypeName } from '../../icc-x-api/utils/EntityWithDelegationTypeName'\nexport class Patient {\n constructor(json: JSON | any) {\n let pictureData: { picture?: ArrayBuffer } = {}\n if (!!json?.picture) {\n if (typeof json.picture === 'string') {\n pictureData.picture = b64_2ab(json.picture)\n } else if (json.picture instanceof ArrayBuffer || ArrayBuffer.isView(json.picture)) {\n pictureData.picture = json.picture\n } else {\n throw new Error(`Invalid type for picture: ${typeof json.picture}`)\n }\n }\n Object.assign(this as Patient, json, pictureData)\n }\n\n /**\n * the Id of the patient. We encourage using either a v4 UUID or a HL7 Id.\n */\n id?: string\n /**\n * the revision of the patient in the database, used for conflict management / optimistic locking.\n */\n rev?: string\n identifier?: Array<Identifier>\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: 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 firstname (name) of the patient.\n */\n firstName?: string\n /**\n * the lastname (surname) of the patient. This is the official lastname that should be used for official administrative purposes.\n */\n lastName?: string\n /**\n * the list of all names of the patient, also containing the official full name information. Ordered by preference of use. First element is therefore the official name used for the patient in the application\n */\n names?: Array<PersonName>\n /**\n * the name of the company this patient is member of.\n */\n companyName?: string\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 * the list of addresses (with address type).\n */\n addresses?: Array<Address>\n /**\n * Mr., Ms., Pr., Dr. ...\n */\n civility?: string\n /**\n * the gender of the patient: male, female, indeterminate, changed, changedToMale, changedToFemale, unknown\n */\n gender?: Patient.GenderEnum\n /**\n * the birth sex of the patient: male, female, indeterminate, unknown\n */\n birthSex?: Patient.BirthSexEnum\n /**\n * The id of the patient this patient has been merged with.\n */\n mergeToPatientId?: string\n /**\n * The ids of the patients that have been merged inside this patient.\n */\n mergedIds?: Array<string>\n /**\n * An alias of the person, nickname, ...\n */\n alias?: string\n /**\n * Is the patient active (boolean).\n */\n active?: boolean\n /**\n * When not active, the reason for deactivation.\n */\n deactivationReason?: Patient.DeactivationReasonEnum\n /**\n * Deactivation date of the patient\n */\n deactivationDate?: number\n /**\n * Social security inscription number.\n */\n ssin?: string\n /**\n * Lastname at birth (can be different of the current name), depending on the country, must be used to design the patient .\n */\n maidenName?: string\n /**\n * Lastname of the spouse for a married woman, depending on the country, can be used to design the patient.\n */\n spouseName?: string\n /**\n * Lastname of the partner, should not be used to design the patient.\n */\n partnerName?: string\n /**\n * any of `single`, `in_couple`, `married`, `separated`, `divorced`, `divorcing`, `widowed`, `widower`, `complicated`, `unknown`, `contract`, `other`.\n */\n personalStatus?: Patient.PersonalStatusEnum\n /**\n * The birthdate encoded as a fuzzy date on 8 positions (YYYYMMDD) MM and/or DD can be set to 00 if unknown (19740000 is a valid date).\n */\n dateOfBirth?: number\n /**\n * The date of death encoded as a fuzzy date on 8 positions (YYYYMMDD) MM and/or DD can be set to 00 if unknown (19740000 is a valid date).\n */\n dateOfDeath?: number\n /**\n * Timestamp of the latest validation of the eID of the person..\n */\n timestampOfLatestEidReading?: number\n /**\n * The place of birth.\n */\n placeOfBirth?: string\n /**\n * The place of death.\n */\n placeOfDeath?: string\n /**\n * Is the patient deceased.\n */\n deceased?: boolean\n /**\n * The level of education (college degree, undergraduate, phd).\n */\n education?: string\n /**\n * The current professional activity.\n */\n profession?: string\n /**\n * A text note (can be confidential, encrypted by default).\n * @deprecated use notes instead with proper tags\n */\n note?: string\n /**\n * An administrative note, not confidential.\n * @deprecated use notes instead with proper tags\n */\n administrativeNote?: string\n /**\n * A list of localized notes.\n */\n notes?: Annotation[]\n /**\n * The nationality of the patient.\n */\n nationality?: string\n /**\n * The race of the patient.\n */\n race?: string\n /**\n * The ethnicity of the patient.\n */\n ethnicity?: string\n /**\n * The id of the user that usually handles this patient.\n */\n preferredUserId?: string\n /**\n * A picture usually saved in JPEG format.\n */\n picture?: ArrayBuffer\n /**\n * An external (from another source) id with no guarantee or requirement for unicity .\n */\n externalId?: string\n /**\n * List of insurance coverages (of class Insurability, see below).\n */\n insurabilities?: Array<Insurability>\n /**\n * List of partners, or persons of contact (of class Partnership, see below).\n */\n partnerships?: Array<Partnership>\n /**\n * Links (usually for therapeutic reasons) between this patient and healthcare parties (of class PatientHealthcareParty).\n */\n patientHealthCareParties?: Array<PatientHealthCareParty>\n /**\n * Financial information (Bank, bank account) used to reimburse the patient.\n */\n financialInstitutionInformation?: Array<FinancialInstitutionInformation>\n /**\n * Contracts between the patient and the healthcare entity.\n */\n medicalHouseContracts?: Array<MedicalHouseContract>\n /**\n * Codified list of professions exercised by this patient.\n */\n patientProfessions?: Array<CodeStub>\n /**\n * Extra parameters\n */\n parameters?: { [key: string]: Array<string> }\n /**\n * Extra properties\n */\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: { myPubKey1: aesExKey_for_this, delegatePubKey1: aesExKey_for_delegate } } }\n */\n aesExchangeKeys?: { [key: string]: { [key: string]: { [key: string]: 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 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 /**\n * The public keys of this actor that are generates using the OAEP Sha-256 standard\n */\n publicKeysForOaepWithSha256?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.\n */\n secretForeignKeys?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.\n */\n cryptedForeignKeys?: { [key: string]: Array<Delegation> }\n /**\n * When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well\n */\n delegations?: { [key: string]: Array<Delegation> }\n /**\n * When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation\n */\n encryptionKeys?: { [key: string]: Array<Delegation> }\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n nonDuplicateIds?: Array<string>\n encryptedAdministrativesDocuments?: Array<string>\n comment?: string\n warning?: string\n fatherBirthCountry?: CodeStub\n birthCountry?: CodeStub\n nativeCountry?: CodeStub\n socialStatus?: CodeStub\n mainSourceOfIncome?: CodeStub\n schoolingInfos?: Array<SchoolingInfo>\n employementInfos?: Array<EmploymentInfo>\n securityMetadata?: SecurityMetadata\n parentId?: never\n}\nexport namespace Patient {\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 BirthSexEnum = 'male' | 'female' | 'indeterminate' | 'changed' | 'changedToMale' | 'changedToFemale' | 'unknown'\n export const BirthSexEnum = {\n Male: 'male' as BirthSexEnum,\n Female: 'female' as BirthSexEnum,\n Indeterminate: 'indeterminate' as BirthSexEnum,\n Changed: 'changed' as BirthSexEnum,\n ChangedToMale: 'changedToMale' as BirthSexEnum,\n ChangedToFemale: 'changedToFemale' as BirthSexEnum,\n Unknown: 'unknown' as BirthSexEnum,\n }\n export type DeactivationReasonEnum = 'deceased' | 'moved' | 'other_doctor' | 'retired' | 'no_contact' | 'unknown' | 'none'\n export const DeactivationReasonEnum = {\n Deceased: 'deceased' as DeactivationReasonEnum,\n Moved: 'moved' as DeactivationReasonEnum,\n OtherDoctor: 'other_doctor' as DeactivationReasonEnum,\n Retired: 'retired' as DeactivationReasonEnum,\n NoContact: 'no_contact' as DeactivationReasonEnum,\n Unknown: 'unknown' as DeactivationReasonEnum,\n None: 'none' as DeactivationReasonEnum,\n }\n export type PersonalStatusEnum =\n | 'single'\n | 'in_couple'\n | 'married'\n | 'separated'\n | 'divorced'\n | 'divorcing'\n | 'widowed'\n | 'widower'\n | 'complicated'\n | 'unknown'\n | 'contract'\n | 'other'\n | 'annulled'\n | 'polygamous'\n export const PersonalStatusEnum = {\n Single: 'single' as PersonalStatusEnum,\n InCouple: 'in_couple' as PersonalStatusEnum,\n Married: 'married' as PersonalStatusEnum,\n Separated: 'separated' as PersonalStatusEnum,\n Divorced: 'divorced' as PersonalStatusEnum,\n Divorcing: 'divorcing' as PersonalStatusEnum,\n Widowed: 'widowed' as PersonalStatusEnum,\n Widower: 'widower' as PersonalStatusEnum,\n Complicated: 'complicated' as PersonalStatusEnum,\n Unknown: 'unknown' as PersonalStatusEnum,\n Contract: 'contract' as PersonalStatusEnum,\n Other: 'other' as PersonalStatusEnum,\n Annulled: 'annulled' as PersonalStatusEnum,\n Polygamous: 'polygamous' as PersonalStatusEnum,\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Patient.js","sourceRoot":"","sources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AQ,EAAE,UAAgC;QAC1C,SAAS,EAAE,WAAiC;QAC5C,OAAO,EAAE,SAA+B;QACxC,OAAO,EAAE,SAA+B;QACxC,WAAW,EAAE,aAAmC;QAChD,OAAO,EAAE,SAA+B;QACxC,QAAQ,EAAE,UAAgC;QAC1C,KAAK,EAAE,OAA6B;QACpC,QAAQ,EAAE,UAAgC;QAC1C,UAAU,EAAE,YAAkC;KAC/C,CAAA;AACH,CAAC,EA9DgB,OAAO,uBAAP,OAAO,QA8DvB","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 { Delegation } from './Delegation'\nimport { EmploymentInfo } from './EmploymentInfo'\nimport { FinancialInstitutionInformation } from './FinancialInstitutionInformation'\nimport { Identifier } from './Identifier'\nimport { Insurability } from './Insurability'\nimport { MedicalHouseContract } from './MedicalHouseContract'\nimport { Partnership } from './Partnership'\nimport { PatientHealthCareParty } from './PatientHealthCareParty'\nimport { PersonName } from './PersonName'\nimport { PropertyStub } from './PropertyStub'\nimport { SchoolingInfo } from './SchoolingInfo'\nimport { Annotation } from './Annotation'\n\n/**\n * This entity is a root level object. It represents a patient It is serialized in JSON and saved in the underlying icure-patient CouchDB database.\n */\nimport { decodeStringOrArrayBuffer} from './ModelHelper'\nimport { SecurityMetadata } from './SecurityMetadata'\n\nexport class Patient {\n constructor(json: JSON | any) {\n let pictureData: { picture?: ArrayBuffer } = {}\n if (!!json?.picture) {\n pictureData.picture = decodeStringOrArrayBuffer(json.picture)\n }\n Object.assign(this as Patient, json, pictureData)\n }\n\n /**\n * the Id of the patient. We encourage using either a v4 UUID or a HL7 Id.\n */\n id?: string\n /**\n * the revision of the patient in the database, used for conflict management / optimistic locking.\n */\n rev?: string\n identifier?: Array<Identifier>\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: 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 firstname (name) of the patient.\n */\n firstName?: string\n /**\n * the lastname (surname) of the patient. This is the official lastname that should be used for official administrative purposes.\n */\n lastName?: string\n /**\n * the list of all names of the patient, also containing the official full name information. Ordered by preference of use. First element is therefore the official name used for the patient in the application\n */\n names?: Array<PersonName>\n /**\n * the name of the company this patient is member of.\n */\n companyName?: string\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 * the list of addresses (with address type).\n */\n addresses?: Array<Address>\n /**\n * Mr., Ms., Pr., Dr. ...\n */\n civility?: string\n /**\n * the gender of the patient: male, female, indeterminate, changed, changedToMale, changedToFemale, unknown\n */\n gender?: Patient.GenderEnum\n /**\n * the birth sex of the patient: male, female, indeterminate, unknown\n */\n birthSex?: Patient.BirthSexEnum\n /**\n * The id of the patient this patient has been merged with.\n */\n mergeToPatientId?: string\n /**\n * The ids of the patients that have been merged inside this patient.\n */\n mergedIds?: Array<string>\n /**\n * An alias of the person, nickname, ...\n */\n alias?: string\n /**\n * Is the patient active (boolean).\n */\n active?: boolean\n /**\n * When not active, the reason for deactivation.\n */\n deactivationReason?: Patient.DeactivationReasonEnum\n /**\n * Deactivation date of the patient\n */\n deactivationDate?: number\n /**\n * Social security inscription number.\n */\n ssin?: string\n /**\n * Lastname at birth (can be different of the current name), depending on the country, must be used to design the patient .\n */\n maidenName?: string\n /**\n * Lastname of the spouse for a married woman, depending on the country, can be used to design the patient.\n */\n spouseName?: string\n /**\n * Lastname of the partner, should not be used to design the patient.\n */\n partnerName?: string\n /**\n * any of `single`, `in_couple`, `married`, `separated`, `divorced`, `divorcing`, `widowed`, `widower`, `complicated`, `unknown`, `contract`, `other`.\n */\n personalStatus?: Patient.PersonalStatusEnum\n /**\n * The birthdate encoded as a fuzzy date on 8 positions (YYYYMMDD) MM and/or DD can be set to 00 if unknown (19740000 is a valid date).\n */\n dateOfBirth?: number\n /**\n * The date of death encoded as a fuzzy date on 8 positions (YYYYMMDD) MM and/or DD can be set to 00 if unknown (19740000 is a valid date).\n */\n dateOfDeath?: number\n /**\n * Timestamp of the latest validation of the eID of the person..\n */\n timestampOfLatestEidReading?: number\n /**\n * The place of birth.\n */\n placeOfBirth?: string\n /**\n * The place of death.\n */\n placeOfDeath?: string\n /**\n * Is the patient deceased.\n */\n deceased?: boolean\n /**\n * The level of education (college degree, undergraduate, phd).\n */\n education?: string\n /**\n * The current professional activity.\n */\n profession?: string\n /**\n * A text note (can be confidential, encrypted by default).\n * @deprecated use notes instead with proper tags\n */\n note?: string\n /**\n * An administrative note, not confidential.\n * @deprecated use notes instead with proper tags\n */\n administrativeNote?: string\n /**\n * A list of localized notes.\n */\n notes?: Annotation[]\n /**\n * The nationality of the patient.\n */\n nationality?: string\n /**\n * The race of the patient.\n */\n race?: string\n /**\n * The ethnicity of the patient.\n */\n ethnicity?: string\n /**\n * The id of the user that usually handles this patient.\n */\n preferredUserId?: string\n /**\n * A picture usually saved in JPEG format.\n */\n picture?: ArrayBuffer\n /**\n * An external (from another source) id with no guarantee or requirement for unicity .\n */\n externalId?: string\n /**\n * List of insurance coverages (of class Insurability, see below).\n */\n insurabilities?: Array<Insurability>\n /**\n * List of partners, or persons of contact (of class Partnership, see below).\n */\n partnerships?: Array<Partnership>\n /**\n * Links (usually for therapeutic reasons) between this patient and healthcare parties (of class PatientHealthcareParty).\n */\n patientHealthCareParties?: Array<PatientHealthCareParty>\n /**\n * Financial information (Bank, bank account) used to reimburse the patient.\n */\n financialInstitutionInformation?: Array<FinancialInstitutionInformation>\n /**\n * Contracts between the patient and the healthcare entity.\n */\n medicalHouseContracts?: Array<MedicalHouseContract>\n /**\n * Codified list of professions exercised by this patient.\n */\n patientProfessions?: Array<CodeStub>\n /**\n * Extra parameters\n */\n parameters?: { [key: string]: Array<string> }\n /**\n * Extra properties\n */\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: { myPubKey1: aesExKey_for_this, delegatePubKey1: aesExKey_for_delegate } } }\n */\n aesExchangeKeys?: { [key: string]: { [key: string]: { [key: string]: 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 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 /**\n * The public keys of this actor that are generates using the OAEP Sha-256 standard\n */\n publicKeysForOaepWithSha256?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.\n */\n secretForeignKeys?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.\n */\n cryptedForeignKeys?: { [key: string]: Array<Delegation> }\n /**\n * When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well\n */\n delegations?: { [key: string]: Array<Delegation> }\n /**\n * When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation\n */\n encryptionKeys?: { [key: string]: Array<Delegation> }\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n nonDuplicateIds?: Array<string>\n encryptedAdministrativesDocuments?: Array<string>\n comment?: string\n warning?: string\n fatherBirthCountry?: CodeStub\n birthCountry?: CodeStub\n nativeCountry?: CodeStub\n socialStatus?: CodeStub\n mainSourceOfIncome?: CodeStub\n schoolingInfos?: Array<SchoolingInfo>\n employementInfos?: Array<EmploymentInfo>\n securityMetadata?: SecurityMetadata\n parentId?: never\n}\nexport namespace Patient {\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 BirthSexEnum = 'male' | 'female' | 'indeterminate' | 'changed' | 'changedToMale' | 'changedToFemale' | 'unknown'\n export const BirthSexEnum = {\n Male: 'male' as BirthSexEnum,\n Female: 'female' as BirthSexEnum,\n Indeterminate: 'indeterminate' as BirthSexEnum,\n Changed: 'changed' as BirthSexEnum,\n ChangedToMale: 'changedToMale' as BirthSexEnum,\n ChangedToFemale: 'changedToFemale' as BirthSexEnum,\n Unknown: 'unknown' as BirthSexEnum,\n }\n export type DeactivationReasonEnum = 'deceased' | 'moved' | 'other_doctor' | 'retired' | 'no_contact' | 'unknown' | 'none'\n export const DeactivationReasonEnum = {\n Deceased: 'deceased' as DeactivationReasonEnum,\n Moved: 'moved' as DeactivationReasonEnum,\n OtherDoctor: 'other_doctor' as DeactivationReasonEnum,\n Retired: 'retired' as DeactivationReasonEnum,\n NoContact: 'no_contact' as DeactivationReasonEnum,\n Unknown: 'unknown' as DeactivationReasonEnum,\n None: 'none' as DeactivationReasonEnum,\n }\n export type PersonalStatusEnum =\n | 'single'\n | 'in_couple'\n | 'married'\n | 'separated'\n | 'divorced'\n | 'divorcing'\n | 'widowed'\n | 'widower'\n | 'complicated'\n | 'unknown'\n | 'contract'\n | 'other'\n | 'annulled'\n | 'polygamous'\n export const PersonalStatusEnum = {\n Single: 'single' as PersonalStatusEnum,\n InCouple: 'in_couple' as PersonalStatusEnum,\n Married: 'married' as PersonalStatusEnum,\n Separated: 'separated' as PersonalStatusEnum,\n Divorced: 'divorced' as PersonalStatusEnum,\n Divorcing: 'divorcing' as PersonalStatusEnum,\n Widowed: 'widowed' as PersonalStatusEnum,\n Widower: 'widower' as PersonalStatusEnum,\n Complicated: 'complicated' as PersonalStatusEnum,\n Unknown: 'unknown' as PersonalStatusEnum,\n Contract: 'contract' as PersonalStatusEnum,\n Other: 'other' as PersonalStatusEnum,\n Annulled: 'annulled' as PersonalStatusEnum,\n Polygamous: 'polygamous' as PersonalStatusEnum,\n }\n}\n"]}
|