vet-data-utils-ts 0.4.8 → 0.4.10
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/README.md +14 -0
- package/dist/clinical-terminology.d.ts +18 -0
- package/dist/clinical-terminology.js +34 -0
- package/dist/communication.d.ts +37 -0
- package/dist/communication.js +30 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -8,6 +8,20 @@ Current surfaces cover the canonical animal-card DID, veterinary summary
|
|
|
8
8
|
sections, animal-only emergency data, pseudonymous DigitalTwin search input and
|
|
9
9
|
veterinary assistant intents.
|
|
10
10
|
|
|
11
|
+
Reusable Communication screens receive immutable workflow presets from
|
|
12
|
+
`vet-data-utils-ts/communication`. The research-agreement screen is fixed to
|
|
13
|
+
FHIR `notification` plus HL7 v3 ActReason `HRESCH` and does not expose a topic
|
|
14
|
+
picker. See [`docs/communication-inbox-filters.md`](docs/communication-inbox-filters.md).
|
|
15
|
+
|
|
16
|
+
Veterinary clinical entry screens obtain their allowed coding systems from
|
|
17
|
+
`vet-data-utils-ts/clinical-terminology`. Observations and diagnostic reports
|
|
18
|
+
use LOINC; conditions additionally support ICD-10; SNOMED CT is offered for
|
|
19
|
+
conditions, procedures and allergies only when the selected ISO country is an
|
|
20
|
+
official SNOMED member territory. A returned candidate is never accepted
|
|
21
|
+
automatically: the professional must review and select it before creating the
|
|
22
|
+
FHIR resource. Membership does not replace national edition, attribution or
|
|
23
|
+
affiliate-license requirements. See the [official member list](https://www.snomed.org/members).
|
|
24
|
+
|
|
11
25
|
The deferred spreadsheet shape for member and employee role assignments is
|
|
12
26
|
documented in [`docs/member-import-contract.md`](docs/member-import-contract.md).
|
|
13
27
|
It is not an implemented importer API.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const VeterinaryClinicalTerminologySystems: Readonly<{
|
|
2
|
+
readonly Loinc: "http://loinc.org";
|
|
3
|
+
readonly SnomedCt: "http://snomed.info/sct";
|
|
4
|
+
readonly Icd10: "http://hl7.org/fhir/sid/icd-10";
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* ISO 3166-1 alpha-2 territories enumerated by the official SNOMED
|
|
8
|
+
* International member page on 2026-09-05.
|
|
9
|
+
* https://www.snomed.org/members
|
|
10
|
+
*
|
|
11
|
+
* The page prose currently says 53 while its regional lists contain 54; this
|
|
12
|
+
* contract follows every named territory and must be refreshed from the source.
|
|
13
|
+
* Membership permits use within the territory but does not replace national
|
|
14
|
+
* release, edition, attribution or affiliate-license requirements.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SnomedMemberCountryCodes: readonly ["AR", "BZ", "CA", "CL", "CR", "SV", "JM", "US", "UY", "AD", "AT", "BE", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "HU", "IS", "IE", "IL", "JO", "LV", "LT", "LU", "MT", "NL", "NO", "PT", "QA", "SI", "SA", "SK", "ZA", "ES", "SE", "CH", "AE", "GB", "AU", "BN", "HK", "IN", "ID", "MY", "MN", "NZ", "KR", "SG", "TH", "UZ"];
|
|
17
|
+
export type VeterinaryCodedResourceType = 'Condition' | 'Procedure' | 'DiagnosticReport' | 'Observation' | 'AllergyIntolerance';
|
|
18
|
+
export declare function veterinaryTerminologySystemsFor(resourceType: VeterinaryCodedResourceType, countryCode: string): readonly string[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const VeterinaryClinicalTerminologySystems = Object.freeze({
|
|
2
|
+
Loinc: 'http://loinc.org',
|
|
3
|
+
SnomedCt: 'http://snomed.info/sct',
|
|
4
|
+
Icd10: 'http://hl7.org/fhir/sid/icd-10',
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* ISO 3166-1 alpha-2 territories enumerated by the official SNOMED
|
|
8
|
+
* International member page on 2026-09-05.
|
|
9
|
+
* https://www.snomed.org/members
|
|
10
|
+
*
|
|
11
|
+
* The page prose currently says 53 while its regional lists contain 54; this
|
|
12
|
+
* contract follows every named territory and must be refreshed from the source.
|
|
13
|
+
* Membership permits use within the territory but does not replace national
|
|
14
|
+
* release, edition, attribution or affiliate-license requirements.
|
|
15
|
+
*/
|
|
16
|
+
export const SnomedMemberCountryCodes = Object.freeze([
|
|
17
|
+
'AR', 'BZ', 'CA', 'CL', 'CR', 'SV', 'JM', 'US', 'UY',
|
|
18
|
+
'AD', 'AT', 'BE', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'HU',
|
|
19
|
+
'IS', 'IE', 'IL', 'JO', 'LV', 'LT', 'LU', 'MT', 'NL', 'NO', 'PT', 'QA',
|
|
20
|
+
'SI', 'SA', 'SK', 'ZA', 'ES', 'SE', 'CH', 'AE', 'GB',
|
|
21
|
+
'AU', 'BN', 'HK', 'IN', 'ID', 'MY', 'MN', 'NZ', 'KR', 'SG', 'TH', 'UZ',
|
|
22
|
+
]);
|
|
23
|
+
export function veterinaryTerminologySystemsFor(resourceType, countryCode) {
|
|
24
|
+
if (resourceType === 'Observation' || resourceType === 'DiagnosticReport') {
|
|
25
|
+
return [VeterinaryClinicalTerminologySystems.Loinc];
|
|
26
|
+
}
|
|
27
|
+
const permitsSnomed = SnomedMemberCountryCodes.includes(countryCode.toUpperCase());
|
|
28
|
+
if (resourceType === 'Condition') {
|
|
29
|
+
return permitsSnomed
|
|
30
|
+
? [VeterinaryClinicalTerminologySystems.SnomedCt, VeterinaryClinicalTerminologySystems.Icd10]
|
|
31
|
+
: [VeterinaryClinicalTerminologySystems.Icd10];
|
|
32
|
+
}
|
|
33
|
+
return permitsSnomed ? [VeterinaryClinicalTerminologySystems.SnomedCt] : [];
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const VeterinaryCommunicationTopicSystems: Readonly<{
|
|
2
|
+
ActReason: "http://terminology.hl7.org/CodeSystem/v3-ActReason";
|
|
3
|
+
}>;
|
|
4
|
+
export type VeterinaryCommunicationTopic = Readonly<{
|
|
5
|
+
system: typeof VeterinaryCommunicationTopicSystems.ActReason;
|
|
6
|
+
code: string;
|
|
7
|
+
value: `${typeof VeterinaryCommunicationTopicSystems.ActReason}|${string}`;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Governed topics included by the VetChain research-agreement inbox.
|
|
11
|
+
* HRESCH is the HL7 v3 ActReason healthcare-research code:
|
|
12
|
+
* http://terminology.hl7.org/CodeSystem/v3-ActReason
|
|
13
|
+
*
|
|
14
|
+
* This topic filter is distinct from the four FHIR Communication categories:
|
|
15
|
+
* https://www.hl7.org/fhir/valueset-communication-category.html
|
|
16
|
+
*/
|
|
17
|
+
export declare const VeterinaryResearchCommunicationTopics: readonly VeterinaryCommunicationTopic[];
|
|
18
|
+
export type VeterinaryCommunicationPresetFilter = Readonly<{
|
|
19
|
+
categories: readonly string[];
|
|
20
|
+
topics: readonly VeterinaryCommunicationTopic[];
|
|
21
|
+
allowTopicSelection: false;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Screen-owned presets for a reusable Communication component. Consumers pass
|
|
25
|
+
* this filter to the component; users cannot broaden the governed topic set.
|
|
26
|
+
*/
|
|
27
|
+
export declare const VeterinaryCommunicationPresetFilters: Readonly<{
|
|
28
|
+
ResearchAgreements: Readonly<{
|
|
29
|
+
categories: readonly string[];
|
|
30
|
+
topics: readonly Readonly<{
|
|
31
|
+
system: typeof VeterinaryCommunicationTopicSystems.ActReason;
|
|
32
|
+
code: string;
|
|
33
|
+
value: `${typeof VeterinaryCommunicationTopicSystems.ActReason}|${string}`;
|
|
34
|
+
}>[];
|
|
35
|
+
allowTopicSelection: false;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommunicationCategoryCodes } from 'gdc-common-utils-ts/constants/communication';
|
|
2
|
+
export const VeterinaryCommunicationTopicSystems = Object.freeze({
|
|
3
|
+
ActReason: 'http://terminology.hl7.org/CodeSystem/v3-ActReason',
|
|
4
|
+
});
|
|
5
|
+
/**
|
|
6
|
+
* Governed topics included by the VetChain research-agreement inbox.
|
|
7
|
+
* HRESCH is the HL7 v3 ActReason healthcare-research code:
|
|
8
|
+
* http://terminology.hl7.org/CodeSystem/v3-ActReason
|
|
9
|
+
*
|
|
10
|
+
* This topic filter is distinct from the four FHIR Communication categories:
|
|
11
|
+
* https://www.hl7.org/fhir/valueset-communication-category.html
|
|
12
|
+
*/
|
|
13
|
+
export const VeterinaryResearchCommunicationTopics = Object.freeze([
|
|
14
|
+
Object.freeze({
|
|
15
|
+
system: VeterinaryCommunicationTopicSystems.ActReason,
|
|
16
|
+
code: 'HRESCH',
|
|
17
|
+
value: `${VeterinaryCommunicationTopicSystems.ActReason}|HRESCH`,
|
|
18
|
+
}),
|
|
19
|
+
]);
|
|
20
|
+
/**
|
|
21
|
+
* Screen-owned presets for a reusable Communication component. Consumers pass
|
|
22
|
+
* this filter to the component; users cannot broaden the governed topic set.
|
|
23
|
+
*/
|
|
24
|
+
export const VeterinaryCommunicationPresetFilters = Object.freeze({
|
|
25
|
+
ResearchAgreements: Object.freeze({
|
|
26
|
+
categories: Object.freeze([CommunicationCategoryCodes.Notification.attributeValue]),
|
|
27
|
+
topics: VeterinaryResearchCommunicationTopics,
|
|
28
|
+
allowTopicSelection: false,
|
|
29
|
+
}),
|
|
30
|
+
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vet-data-utils-ts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
4
4
|
"description": "Browser-safe governed VetChain data contracts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Connecting Solution & Applications Ltd",
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
"types": "./dist/animal-card.d.ts",
|
|
17
17
|
"default": "./dist/animal-card.js"
|
|
18
18
|
},
|
|
19
|
+
"./communication": {
|
|
20
|
+
"types": "./dist/communication.d.ts",
|
|
21
|
+
"default": "./dist/communication.js"
|
|
22
|
+
},
|
|
23
|
+
"./clinical-terminology": {
|
|
24
|
+
"types": "./dist/clinical-terminology.d.ts",
|
|
25
|
+
"default": "./dist/clinical-terminology.js"
|
|
26
|
+
},
|
|
19
27
|
"./digital-twin": {
|
|
20
28
|
"types": "./dist/digital-twin.d.ts",
|
|
21
29
|
"default": "./dist/digital-twin.js"
|
|
@@ -68,7 +76,7 @@
|
|
|
68
76
|
"typescript": "^5.5.4"
|
|
69
77
|
},
|
|
70
78
|
"dependencies": {
|
|
71
|
-
"gdc-common-utils-ts": "2.
|
|
79
|
+
"gdc-common-utils-ts": "2.8.8"
|
|
72
80
|
},
|
|
73
81
|
"engines": {
|
|
74
82
|
"node": ">=20"
|