@icure/api 8.13.0 → 8.13.1
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Identifier } from './Identifier';
|
|
1
2
|
/**
|
|
2
3
|
* The party asserting that the patient has the healthcare element this asserter is attached to.
|
|
3
4
|
*
|
|
@@ -6,28 +7,68 @@
|
|
|
6
7
|
* report a condition on behalf of the patient, and a physician may assert a diagnosis: all three are asserters, and the
|
|
7
8
|
* same healthcare element may carry more than one of them.
|
|
8
9
|
*
|
|
9
|
-
* The
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* The party is named in exactly one of two ways, and exactly one of the two fields must be set:
|
|
11
|
+
* - `localAsserterIdentifier` names a party stored in this iCure instance: an id, plus the `AsserterTypeEnum` saying
|
|
12
|
+
* which kind of record that id points at;
|
|
13
|
+
* - `externalAsserterIdentifier` names a party that has no record here, through a business `Identifier` issued by
|
|
14
|
+
* another system. There is deliberately no asserter type on this branch: the kind of a record we do not store is not
|
|
15
|
+
* knowable to us.
|
|
16
|
+
*
|
|
17
|
+
* Both fields of `LocalAsserterIdentifier` are required by the server and by the other iCure SDKs, and are declared
|
|
18
|
+
* optional here only because every model in this layer is. An asserter written with a partial local identifier cannot
|
|
19
|
+
* be read back by those SDKs.
|
|
20
|
+
*
|
|
21
|
+
* Do not rely on the server to enforce any of the above. `asserters` is encrypted by default (see
|
|
22
|
+
* `EncryptedFieldsConfig.Defaults.healthElement`), so the server usually sees only ciphertext and its own checks - the
|
|
23
|
+
* exactly-one rule, id not blank - never run. They do run for a client that overrides `encryptedFieldsConfig` for
|
|
24
|
+
* health elements without keeping `asserters` in the list, and a violation then surfaces as a `400`. The pairing inside
|
|
25
|
+
* `LocalAsserterIdentifier` is never checked anywhere: `AsserterTypeEnum` bounds the vocabulary, not what the id
|
|
26
|
+
* actually points at. All of these invariants are the caller's responsibility.
|
|
12
27
|
*
|
|
13
28
|
* Note on organisations: an organisation (hospital, practice, care home, ...) is not a distinct asserter type.
|
|
14
29
|
* Organisations are stored as healthcare party records, distinguished from individual practitioners by tags set by the
|
|
15
|
-
* client, so an organisation asserter is
|
|
16
|
-
* such a record. The association between a practitioner and the organisation they were acting for at the time of
|
|
17
|
-
* assertion is deliberately not modelled here.
|
|
30
|
+
* client, so an organisation asserter is a `localAsserterIdentifier` with `type = 'healthcareParty'` whose `id` points
|
|
31
|
+
* to such a record. The association between a practitioner and the organisation they were acting for at the time of
|
|
32
|
+
* the assertion is deliberately not modelled here.
|
|
18
33
|
*/
|
|
19
34
|
export declare class HealthElementAsserter {
|
|
20
35
|
constructor(json: JSON | any);
|
|
21
36
|
/**
|
|
22
|
-
* The
|
|
37
|
+
* The asserting party, as a reference to a record stored in this instance. Unset when the party is named by
|
|
38
|
+
* externalAsserterIdentifier.
|
|
23
39
|
*/
|
|
24
|
-
|
|
40
|
+
localAsserterIdentifier?: HealthElementAsserter.LocalAsserterIdentifier;
|
|
25
41
|
/**
|
|
26
|
-
* The
|
|
27
|
-
*
|
|
42
|
+
* The asserting party, as a business identifier from a system that is not this one. Unset when the party is named by
|
|
43
|
+
* localAsserterIdentifier. Carries no asserter type.
|
|
28
44
|
*/
|
|
29
|
-
|
|
45
|
+
externalAsserterIdentifier?: Identifier;
|
|
30
46
|
}
|
|
31
47
|
export declare namespace HealthElementAsserter {
|
|
48
|
+
/**
|
|
49
|
+
* A reference to the record, stored in iCure.
|
|
50
|
+
*/
|
|
51
|
+
class LocalAsserterIdentifier {
|
|
52
|
+
constructor(json: JSON | any);
|
|
53
|
+
/**
|
|
54
|
+
* The id of the entity making the assertion. Which entity it refers to is given by type.
|
|
55
|
+
*/
|
|
56
|
+
id?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The kind of entity id refers to. This is the entity-kind axis, not the role the party played in the assertion.
|
|
59
|
+
*/
|
|
60
|
+
type?: AsserterTypeEnum;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The kind of entity a LocalAsserterIdentifier id refers to.
|
|
64
|
+
*
|
|
65
|
+
* There is no entry for an organisation: organisations are stored as healthcare party records, so they use
|
|
66
|
+
* `healthcareParty` (see the note on the class).
|
|
67
|
+
*/
|
|
32
68
|
type AsserterTypeEnum = 'patient' | 'healthcareParty' | 'relatedPerson';
|
|
69
|
+
const AsserterTypeEnum: {
|
|
70
|
+
Patient: AsserterTypeEnum;
|
|
71
|
+
HealthcareParty: AsserterTypeEnum;
|
|
72
|
+
RelatedPerson: AsserterTypeEnum;
|
|
73
|
+
};
|
|
33
74
|
}
|
|
@@ -9,15 +9,29 @@ exports.HealthElementAsserter = void 0;
|
|
|
9
9
|
* report a condition on behalf of the patient, and a physician may assert a diagnosis: all three are asserters, and the
|
|
10
10
|
* same healthcare element may carry more than one of them.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* The party is named in exactly one of two ways, and exactly one of the two fields must be set:
|
|
13
|
+
* - `localAsserterIdentifier` names a party stored in this iCure instance: an id, plus the `AsserterTypeEnum` saying
|
|
14
|
+
* which kind of record that id points at;
|
|
15
|
+
* - `externalAsserterIdentifier` names a party that has no record here, through a business `Identifier` issued by
|
|
16
|
+
* another system. There is deliberately no asserter type on this branch: the kind of a record we do not store is not
|
|
17
|
+
* knowable to us.
|
|
18
|
+
*
|
|
19
|
+
* Both fields of `LocalAsserterIdentifier` are required by the server and by the other iCure SDKs, and are declared
|
|
20
|
+
* optional here only because every model in this layer is. An asserter written with a partial local identifier cannot
|
|
21
|
+
* be read back by those SDKs.
|
|
22
|
+
*
|
|
23
|
+
* Do not rely on the server to enforce any of the above. `asserters` is encrypted by default (see
|
|
24
|
+
* `EncryptedFieldsConfig.Defaults.healthElement`), so the server usually sees only ciphertext and its own checks - the
|
|
25
|
+
* exactly-one rule, id not blank - never run. They do run for a client that overrides `encryptedFieldsConfig` for
|
|
26
|
+
* health elements without keeping `asserters` in the list, and a violation then surfaces as a `400`. The pairing inside
|
|
27
|
+
* `LocalAsserterIdentifier` is never checked anywhere: `AsserterTypeEnum` bounds the vocabulary, not what the id
|
|
28
|
+
* actually points at. All of these invariants are the caller's responsibility.
|
|
15
29
|
*
|
|
16
30
|
* Note on organisations: an organisation (hospital, practice, care home, ...) is not a distinct asserter type.
|
|
17
31
|
* Organisations are stored as healthcare party records, distinguished from individual practitioners by tags set by the
|
|
18
|
-
* client, so an organisation asserter is
|
|
19
|
-
* such a record. The association between a practitioner and the organisation they were acting for at the time of
|
|
20
|
-
* assertion is deliberately not modelled here.
|
|
32
|
+
* client, so an organisation asserter is a `localAsserterIdentifier` with `type = 'healthcareParty'` whose `id` points
|
|
33
|
+
* to such a record. The association between a practitioner and the organisation they were acting for at the time of
|
|
34
|
+
* the assertion is deliberately not modelled here.
|
|
21
35
|
*/
|
|
22
36
|
class HealthElementAsserter {
|
|
23
37
|
constructor(json) {
|
|
@@ -25,4 +39,20 @@ class HealthElementAsserter {
|
|
|
25
39
|
}
|
|
26
40
|
}
|
|
27
41
|
exports.HealthElementAsserter = HealthElementAsserter;
|
|
42
|
+
(function (HealthElementAsserter) {
|
|
43
|
+
/**
|
|
44
|
+
* A reference to the record, stored in iCure.
|
|
45
|
+
*/
|
|
46
|
+
class LocalAsserterIdentifier {
|
|
47
|
+
constructor(json) {
|
|
48
|
+
Object.assign(this, json);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
HealthElementAsserter.LocalAsserterIdentifier = LocalAsserterIdentifier;
|
|
52
|
+
HealthElementAsserter.AsserterTypeEnum = {
|
|
53
|
+
Patient: 'patient',
|
|
54
|
+
HealthcareParty: 'healthcareParty',
|
|
55
|
+
RelatedPerson: 'relatedPerson',
|
|
56
|
+
};
|
|
57
|
+
})(HealthElementAsserter || (exports.HealthElementAsserter = HealthElementAsserter = {}));
|
|
28
58
|
//# sourceMappingURL=HealthElementAsserter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HealthElementAsserter.js","sourceRoot":"","sources":["../../../icc-api/model/HealthElementAsserter.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"HealthElementAsserter.js","sourceRoot":"","sources":["../../../icc-api/model/HealthElementAsserter.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,qBAAqB;IAChC,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAA6B,EAAE,IAAI,CAAC,CAAA;IACpD,CAAC;CAYF;AAfD,sDAeC;AAED,WAAiB,qBAAqB;IACpC;;OAEG;IACH,MAAa,uBAAuB;QAClC,YAAY,IAAgB;YAC1B,MAAM,CAAC,MAAM,CAAC,IAA+B,EAAE,IAAI,CAAC,CAAA;QACtD,CAAC;KAUF;IAbY,6CAAuB,0BAanC,CAAA;IASY,sCAAgB,GAAG;QAC9B,OAAO,EAAE,SAA6B;QACtC,eAAe,EAAE,iBAAqC;QACtD,aAAa,EAAE,eAAmC;KACnD,CAAA;AACH,CAAC,EA/BgB,qBAAqB,qCAArB,qBAAqB,QA+BrC","sourcesContent":["import { Identifier } from './Identifier'\n\n/**\n * The party asserting that the patient has the healthcare element this asserter is attached to.\n *\n * This is the FHIR-style asserter concept: it does not say who recorded or authored the healthcare element, it says on\n * whose word the healthcare element is held to be true. A patient may self-report an allergy, a family member may\n * report a condition on behalf of the patient, and a physician may assert a diagnosis: all three are asserters, and the\n * same healthcare element may carry more than one of them.\n *\n * The party is named in exactly one of two ways, and exactly one of the two fields must be set:\n * - `localAsserterIdentifier` names a party stored in this iCure instance: an id, plus the `AsserterTypeEnum` saying\n * which kind of record that id points at;\n * - `externalAsserterIdentifier` names a party that has no record here, through a business `Identifier` issued by\n * another system. There is deliberately no asserter type on this branch: the kind of a record we do not store is not\n * knowable to us.\n *\n * Both fields of `LocalAsserterIdentifier` are required by the server and by the other iCure SDKs, and are declared\n * optional here only because every model in this layer is. An asserter written with a partial local identifier cannot\n * be read back by those SDKs.\n *\n * Do not rely on the server to enforce any of the above. `asserters` is encrypted by default (see\n * `EncryptedFieldsConfig.Defaults.healthElement`), so the server usually sees only ciphertext and its own checks - the\n * exactly-one rule, id not blank - never run. They do run for a client that overrides `encryptedFieldsConfig` for\n * health elements without keeping `asserters` in the list, and a violation then surfaces as a `400`. The pairing inside\n * `LocalAsserterIdentifier` is never checked anywhere: `AsserterTypeEnum` bounds the vocabulary, not what the id\n * actually points at. All of these invariants are the caller's responsibility.\n *\n * Note on organisations: an organisation (hospital, practice, care home, ...) is not a distinct asserter type.\n * Organisations are stored as healthcare party records, distinguished from individual practitioners by tags set by the\n * client, so an organisation asserter is a `localAsserterIdentifier` with `type = 'healthcareParty'` whose `id` points\n * to such a record. The association between a practitioner and the organisation they were acting for at the time of\n * the assertion is deliberately not modelled here.\n */\nexport class HealthElementAsserter {\n constructor(json: JSON | any) {\n Object.assign(this as HealthElementAsserter, json)\n }\n\n /**\n * The asserting party, as a reference to a record stored in this instance. Unset when the party is named by\n * externalAsserterIdentifier.\n */\n localAsserterIdentifier?: HealthElementAsserter.LocalAsserterIdentifier\n /**\n * The asserting party, as a business identifier from a system that is not this one. Unset when the party is named by\n * localAsserterIdentifier. Carries no asserter type.\n */\n externalAsserterIdentifier?: Identifier\n}\n\nexport namespace HealthElementAsserter {\n /**\n * A reference to the record, stored in iCure.\n */\n export class LocalAsserterIdentifier {\n constructor(json: JSON | any) {\n Object.assign(this as LocalAsserterIdentifier, json)\n }\n\n /**\n * The id of the entity making the assertion. Which entity it refers to is given by type.\n */\n id?: string\n /**\n * The kind of entity id refers to. This is the entity-kind axis, not the role the party played in the assertion.\n */\n type?: AsserterTypeEnum\n }\n\n /**\n * The kind of entity a LocalAsserterIdentifier id refers to.\n *\n * There is no entry for an organisation: organisations are stored as healthcare party records, so they use\n * `healthcareParty` (see the note on the class).\n */\n export type AsserterTypeEnum = 'patient' | 'healthcareParty' | 'relatedPerson'\n export const AsserterTypeEnum = {\n Patient: 'patient' as AsserterTypeEnum,\n HealthcareParty: 'healthcareParty' as AsserterTypeEnum,\n RelatedPerson: 'relatedPerson' as AsserterTypeEnum,\n }\n}\n"]}
|