vet-data-utils-ts 0.4.9 → 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 CHANGED
@@ -13,6 +13,15 @@ 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
+
16
25
  The deferred spreadsheet shape for member and employee role assignments is
17
26
  documented in [`docs/member-import-contract.md`](docs/member-import-contract.md).
18
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
+ }
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.10",
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"