vet-data-utils-ts 0.4.9 → 0.4.11

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 CHANGED
@@ -13,6 +13,18 @@ Reusable Communication screens receive immutable workflow presets from
13
13
  FHIR `notification` plus HL7 v3 ActReason `HRESCH` and does not expose a topic
14
14
  picker. See [`docs/communication-inbox-filters.md`](docs/communication-inbox-filters.md).
15
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
+ Veterinary immunizations use the distinct WHO ATCvet classification (group QI
25
+ for immunologicals), with SNOMED CT as an additional candidate system where
26
+ territorial use is permitted; ordinary human ATC is not substituted for it.
27
+
16
28
  The deferred spreadsheet shape for member and employee role assignments is
17
29
  documented in [`docs/member-import-contract.md`](docs/member-import-contract.md).
18
30
  It is not an implemented importer API.
@@ -0,0 +1,20 @@
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
+ /** WHO Collaborating Centre ATCvet classification, distinct from human ATC. */
6
+ readonly AtcVet: "http://www.whocc.no/atcvet";
7
+ }>;
8
+ /**
9
+ * ISO 3166-1 alpha-2 territories enumerated by the official SNOMED
10
+ * International member page on 2026-09-05.
11
+ * https://www.snomed.org/members
12
+ *
13
+ * The page prose currently says 53 while its regional lists contain 54; this
14
+ * contract follows every named territory and must be refreshed from the source.
15
+ * Membership permits use within the territory but does not replace national
16
+ * release, edition, attribution or affiliate-license requirements.
17
+ */
18
+ 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"];
19
+ export type VeterinaryCodedResourceType = 'Condition' | 'Procedure' | 'DiagnosticReport' | 'Observation' | 'AllergyIntolerance' | 'Immunization';
20
+ export declare function veterinaryTerminologySystemsFor(resourceType: VeterinaryCodedResourceType, countryCode: string): readonly string[];
@@ -0,0 +1,44 @@
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
+ /** WHO Collaborating Centre ATCvet classification, distinct from human ATC. */
6
+ AtcVet: 'http://www.whocc.no/atcvet',
7
+ });
8
+ /**
9
+ * ISO 3166-1 alpha-2 territories enumerated by the official SNOMED
10
+ * International member page on 2026-09-05.
11
+ * https://www.snomed.org/members
12
+ *
13
+ * The page prose currently says 53 while its regional lists contain 54; this
14
+ * contract follows every named territory and must be refreshed from the source.
15
+ * Membership permits use within the territory but does not replace national
16
+ * release, edition, attribution or affiliate-license requirements.
17
+ */
18
+ export const SnomedMemberCountryCodes = Object.freeze([
19
+ 'AR', 'BZ', 'CA', 'CL', 'CR', 'SV', 'JM', 'US', 'UY',
20
+ 'AD', 'AT', 'BE', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'HU',
21
+ 'IS', 'IE', 'IL', 'JO', 'LV', 'LT', 'LU', 'MT', 'NL', 'NO', 'PT', 'QA',
22
+ 'SI', 'SA', 'SK', 'ZA', 'ES', 'SE', 'CH', 'AE', 'GB',
23
+ 'AU', 'BN', 'HK', 'IN', 'ID', 'MY', 'MN', 'NZ', 'KR', 'SG', 'TH', 'UZ',
24
+ ]);
25
+ export function veterinaryTerminologySystemsFor(resourceType, countryCode) {
26
+ if (resourceType === 'Observation' || resourceType === 'DiagnosticReport') {
27
+ return [VeterinaryClinicalTerminologySystems.Loinc];
28
+ }
29
+ const permitsSnomed = SnomedMemberCountryCodes.includes(countryCode.toUpperCase());
30
+ if (resourceType === 'Condition') {
31
+ return permitsSnomed
32
+ ? [VeterinaryClinicalTerminologySystems.SnomedCt, VeterinaryClinicalTerminologySystems.Icd10]
33
+ : [VeterinaryClinicalTerminologySystems.Icd10];
34
+ }
35
+ if (resourceType === 'Immunization') {
36
+ // ATCvet group QI owns veterinary immunological products. SNOMED CT may
37
+ // additionally express a vaccine concept where territorial use permits it.
38
+ // https://atcddd.fhi.no/atcvet/atcvet_index/
39
+ return permitsSnomed
40
+ ? [VeterinaryClinicalTerminologySystems.AtcVet, VeterinaryClinicalTerminologySystems.SnomedCt]
41
+ : [VeterinaryClinicalTerminologySystems.AtcVet];
42
+ }
43
+ return permitsSnomed ? [VeterinaryClinicalTerminologySystems.SnomedCt] : [];
44
+ }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './animal-card.js';
2
2
  export * from './assistant.js';
3
3
  export * from './communication.js';
4
+ export * from './clinical-terminology.js';
4
5
  export * from './digital-twin.js';
5
6
  export * from './emergency.js';
6
7
  export * from './financial.js';
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './animal-card.js';
2
2
  export * from './assistant.js';
3
3
  export * from './communication.js';
4
+ export * from './clinical-terminology.js';
4
5
  export * from './digital-twin.js';
5
6
  export * from './emergency.js';
6
7
  export * from './financial.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vet-data-utils-ts",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "description": "Browser-safe governed VetChain data contracts",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Connecting Solution & Applications Ltd",
@@ -20,6 +20,10 @@
20
20
  "types": "./dist/communication.d.ts",
21
21
  "default": "./dist/communication.js"
22
22
  },
23
+ "./clinical-terminology": {
24
+ "types": "./dist/clinical-terminology.d.ts",
25
+ "default": "./dist/clinical-terminology.js"
26
+ },
23
27
  "./digital-twin": {
24
28
  "types": "./dist/digital-twin.d.ts",
25
29
  "default": "./dist/digital-twin.js"