vet-sdk-core-ts 0.4.0
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 +37 -0
- package/dist/animal-identity.d.ts +109 -0
- package/dist/animal-identity.js +207 -0
- package/dist/card-issuance.d.ts +20 -0
- package/dist/card-issuance.js +59 -0
- package/dist/gateway-contract.d.ts +60 -0
- package/dist/gateway-contract.js +73 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/species.d.ts +484 -0
- package/dist/species.js +76 -0
- package/node_modules/vet-data-utils-ts/README.md +14 -0
- package/node_modules/vet-data-utils-ts/dist/animal-card.d.ts +14 -0
- package/node_modules/vet-data-utils-ts/dist/animal-card.js +44 -0
- package/node_modules/vet-data-utils-ts/dist/assistant.d.ts +7 -0
- package/node_modules/vet-data-utils-ts/dist/assistant.js +6 -0
- package/node_modules/vet-data-utils-ts/dist/digital-twin.d.ts +13 -0
- package/node_modules/vet-data-utils-ts/dist/digital-twin.js +24 -0
- package/node_modules/vet-data-utils-ts/dist/emergency.d.ts +17 -0
- package/node_modules/vet-data-utils-ts/dist/emergency.js +25 -0
- package/node_modules/vet-data-utils-ts/dist/index.d.ts +5 -0
- package/node_modules/vet-data-utils-ts/dist/index.js +5 -0
- package/node_modules/vet-data-utils-ts/dist/veterinary-sections.d.ts +101 -0
- package/node_modules/vet-data-utils-ts/dist/veterinary-sections.js +25 -0
- package/node_modules/vet-data-utils-ts/package.json +29 -0
- package/package.json +59 -0
- package/vendor/vet-data-utils-ts-0.3.0.tgz +0 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
export type NcbiTaxonomyId = `${number}`;
|
|
2
|
+
export type VetChainAnimalGroup = "companion-mammal" | "equid-camelid" | "livestock" | "bird" | "aquatic" | "reptile-amphibian" | "managed-invertebrate";
|
|
3
|
+
export type VetChainSpeciesDefinition = Readonly<{
|
|
4
|
+
/** Stable code used for application data and locale lookups. */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
7
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
8
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
9
|
+
scientificName: string;
|
|
10
|
+
group: VetChainAnimalGroup;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Governed starter catalogue for domesticated and commonly kept animals.
|
|
14
|
+
*
|
|
15
|
+
* This is deliberately extensible: VetChain accepts other verified non-human
|
|
16
|
+
* NCBI Taxonomy identifiers without pretending that any static list can cover
|
|
17
|
+
* every species kept in every jurisdiction. Localized common names belong in
|
|
18
|
+
* portal i18n and use these stable keys.
|
|
19
|
+
*/
|
|
20
|
+
export declare const VetChainDomesticAnimalSpecies: Readonly<{
|
|
21
|
+
readonly Dog: Readonly<{
|
|
22
|
+
/** Stable code used for application data and locale lookups. */
|
|
23
|
+
key: string;
|
|
24
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
25
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
26
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
27
|
+
scientificName: string;
|
|
28
|
+
group: VetChainAnimalGroup;
|
|
29
|
+
}>;
|
|
30
|
+
readonly Cat: Readonly<{
|
|
31
|
+
/** Stable code used for application data and locale lookups. */
|
|
32
|
+
key: string;
|
|
33
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
34
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
35
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
36
|
+
scientificName: string;
|
|
37
|
+
group: VetChainAnimalGroup;
|
|
38
|
+
}>;
|
|
39
|
+
readonly Rabbit: Readonly<{
|
|
40
|
+
/** Stable code used for application data and locale lookups. */
|
|
41
|
+
key: string;
|
|
42
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
43
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
44
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
45
|
+
scientificName: string;
|
|
46
|
+
group: VetChainAnimalGroup;
|
|
47
|
+
}>;
|
|
48
|
+
readonly DomesticFerret: Readonly<{
|
|
49
|
+
/** Stable code used for application data and locale lookups. */
|
|
50
|
+
key: string;
|
|
51
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
52
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
53
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
54
|
+
scientificName: string;
|
|
55
|
+
group: VetChainAnimalGroup;
|
|
56
|
+
}>;
|
|
57
|
+
readonly DomesticGuineaPig: Readonly<{
|
|
58
|
+
/** Stable code used for application data and locale lookups. */
|
|
59
|
+
key: string;
|
|
60
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
61
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
62
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
63
|
+
scientificName: string;
|
|
64
|
+
group: VetChainAnimalGroup;
|
|
65
|
+
}>;
|
|
66
|
+
readonly GoldenHamster: Readonly<{
|
|
67
|
+
/** Stable code used for application data and locale lookups. */
|
|
68
|
+
key: string;
|
|
69
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
70
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
71
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
72
|
+
scientificName: string;
|
|
73
|
+
group: VetChainAnimalGroup;
|
|
74
|
+
}>;
|
|
75
|
+
readonly ChineseHamster: Readonly<{
|
|
76
|
+
/** Stable code used for application data and locale lookups. */
|
|
77
|
+
key: string;
|
|
78
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
79
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
80
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
81
|
+
scientificName: string;
|
|
82
|
+
group: VetChainAnimalGroup;
|
|
83
|
+
}>;
|
|
84
|
+
readonly HouseMouse: Readonly<{
|
|
85
|
+
/** Stable code used for application data and locale lookups. */
|
|
86
|
+
key: string;
|
|
87
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
88
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
89
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
90
|
+
scientificName: string;
|
|
91
|
+
group: VetChainAnimalGroup;
|
|
92
|
+
}>;
|
|
93
|
+
readonly NorwayRat: Readonly<{
|
|
94
|
+
/** Stable code used for application data and locale lookups. */
|
|
95
|
+
key: string;
|
|
96
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
97
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
98
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
99
|
+
scientificName: string;
|
|
100
|
+
group: VetChainAnimalGroup;
|
|
101
|
+
}>;
|
|
102
|
+
readonly AfricanPygmyHedgehog: Readonly<{
|
|
103
|
+
/** Stable code used for application data and locale lookups. */
|
|
104
|
+
key: string;
|
|
105
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
106
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
107
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
108
|
+
scientificName: string;
|
|
109
|
+
group: VetChainAnimalGroup;
|
|
110
|
+
}>;
|
|
111
|
+
readonly Horse: Readonly<{
|
|
112
|
+
/** Stable code used for application data and locale lookups. */
|
|
113
|
+
key: string;
|
|
114
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
115
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
116
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
117
|
+
scientificName: string;
|
|
118
|
+
group: VetChainAnimalGroup;
|
|
119
|
+
}>;
|
|
120
|
+
readonly Donkey: Readonly<{
|
|
121
|
+
/** Stable code used for application data and locale lookups. */
|
|
122
|
+
key: string;
|
|
123
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
124
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
125
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
126
|
+
scientificName: string;
|
|
127
|
+
group: VetChainAnimalGroup;
|
|
128
|
+
}>;
|
|
129
|
+
readonly Llama: Readonly<{
|
|
130
|
+
/** Stable code used for application data and locale lookups. */
|
|
131
|
+
key: string;
|
|
132
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
133
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
134
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
135
|
+
scientificName: string;
|
|
136
|
+
group: VetChainAnimalGroup;
|
|
137
|
+
}>;
|
|
138
|
+
readonly Alpaca: Readonly<{
|
|
139
|
+
/** Stable code used for application data and locale lookups. */
|
|
140
|
+
key: string;
|
|
141
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
142
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
143
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
144
|
+
scientificName: string;
|
|
145
|
+
group: VetChainAnimalGroup;
|
|
146
|
+
}>;
|
|
147
|
+
readonly DromedaryCamel: Readonly<{
|
|
148
|
+
/** Stable code used for application data and locale lookups. */
|
|
149
|
+
key: string;
|
|
150
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
151
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
152
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
153
|
+
scientificName: string;
|
|
154
|
+
group: VetChainAnimalGroup;
|
|
155
|
+
}>;
|
|
156
|
+
readonly BactrianCamel: Readonly<{
|
|
157
|
+
/** Stable code used for application data and locale lookups. */
|
|
158
|
+
key: string;
|
|
159
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
160
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
161
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
162
|
+
scientificName: string;
|
|
163
|
+
group: VetChainAnimalGroup;
|
|
164
|
+
}>;
|
|
165
|
+
readonly DomesticCattle: Readonly<{
|
|
166
|
+
/** Stable code used for application data and locale lookups. */
|
|
167
|
+
key: string;
|
|
168
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
169
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
170
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
171
|
+
scientificName: string;
|
|
172
|
+
group: VetChainAnimalGroup;
|
|
173
|
+
}>;
|
|
174
|
+
readonly ZebuCattle: Readonly<{
|
|
175
|
+
/** Stable code used for application data and locale lookups. */
|
|
176
|
+
key: string;
|
|
177
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
178
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
179
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
180
|
+
scientificName: string;
|
|
181
|
+
group: VetChainAnimalGroup;
|
|
182
|
+
}>;
|
|
183
|
+
readonly WaterBuffalo: Readonly<{
|
|
184
|
+
/** Stable code used for application data and locale lookups. */
|
|
185
|
+
key: string;
|
|
186
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
187
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
188
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
189
|
+
scientificName: string;
|
|
190
|
+
group: VetChainAnimalGroup;
|
|
191
|
+
}>;
|
|
192
|
+
readonly DomesticYak: Readonly<{
|
|
193
|
+
/** Stable code used for application data and locale lookups. */
|
|
194
|
+
key: string;
|
|
195
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
196
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
197
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
198
|
+
scientificName: string;
|
|
199
|
+
group: VetChainAnimalGroup;
|
|
200
|
+
}>;
|
|
201
|
+
readonly Goat: Readonly<{
|
|
202
|
+
/** Stable code used for application data and locale lookups. */
|
|
203
|
+
key: string;
|
|
204
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
205
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
206
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
207
|
+
scientificName: string;
|
|
208
|
+
group: VetChainAnimalGroup;
|
|
209
|
+
}>;
|
|
210
|
+
readonly Sheep: Readonly<{
|
|
211
|
+
/** Stable code used for application data and locale lookups. */
|
|
212
|
+
key: string;
|
|
213
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
214
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
215
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
216
|
+
scientificName: string;
|
|
217
|
+
group: VetChainAnimalGroup;
|
|
218
|
+
}>;
|
|
219
|
+
readonly Pig: Readonly<{
|
|
220
|
+
/** Stable code used for application data and locale lookups. */
|
|
221
|
+
key: string;
|
|
222
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
223
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
224
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
225
|
+
scientificName: string;
|
|
226
|
+
group: VetChainAnimalGroup;
|
|
227
|
+
}>;
|
|
228
|
+
readonly Reindeer: Readonly<{
|
|
229
|
+
/** Stable code used for application data and locale lookups. */
|
|
230
|
+
key: string;
|
|
231
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
232
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
233
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
234
|
+
scientificName: string;
|
|
235
|
+
group: VetChainAnimalGroup;
|
|
236
|
+
}>;
|
|
237
|
+
readonly Chicken: Readonly<{
|
|
238
|
+
/** Stable code used for application data and locale lookups. */
|
|
239
|
+
key: string;
|
|
240
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
241
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
242
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
243
|
+
scientificName: string;
|
|
244
|
+
group: VetChainAnimalGroup;
|
|
245
|
+
}>;
|
|
246
|
+
readonly Turkey: Readonly<{
|
|
247
|
+
/** Stable code used for application data and locale lookups. */
|
|
248
|
+
key: string;
|
|
249
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
250
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
251
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
252
|
+
scientificName: string;
|
|
253
|
+
group: VetChainAnimalGroup;
|
|
254
|
+
}>;
|
|
255
|
+
readonly DomesticDuck: Readonly<{
|
|
256
|
+
/** Stable code used for application data and locale lookups. */
|
|
257
|
+
key: string;
|
|
258
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
259
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
260
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
261
|
+
scientificName: string;
|
|
262
|
+
group: VetChainAnimalGroup;
|
|
263
|
+
}>;
|
|
264
|
+
readonly DomesticGoose: Readonly<{
|
|
265
|
+
/** Stable code used for application data and locale lookups. */
|
|
266
|
+
key: string;
|
|
267
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
268
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
269
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
270
|
+
scientificName: string;
|
|
271
|
+
group: VetChainAnimalGroup;
|
|
272
|
+
}>;
|
|
273
|
+
readonly RockPigeon: Readonly<{
|
|
274
|
+
/** Stable code used for application data and locale lookups. */
|
|
275
|
+
key: string;
|
|
276
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
277
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
278
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
279
|
+
scientificName: string;
|
|
280
|
+
group: VetChainAnimalGroup;
|
|
281
|
+
}>;
|
|
282
|
+
readonly Budgerigar: Readonly<{
|
|
283
|
+
/** Stable code used for application data and locale lookups. */
|
|
284
|
+
key: string;
|
|
285
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
286
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
287
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
288
|
+
scientificName: string;
|
|
289
|
+
group: VetChainAnimalGroup;
|
|
290
|
+
}>;
|
|
291
|
+
readonly Cockatiel: Readonly<{
|
|
292
|
+
/** Stable code used for application data and locale lookups. */
|
|
293
|
+
key: string;
|
|
294
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
295
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
296
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
297
|
+
scientificName: string;
|
|
298
|
+
group: VetChainAnimalGroup;
|
|
299
|
+
}>;
|
|
300
|
+
readonly Canary: Readonly<{
|
|
301
|
+
/** Stable code used for application data and locale lookups. */
|
|
302
|
+
key: string;
|
|
303
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
304
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
305
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
306
|
+
scientificName: string;
|
|
307
|
+
group: VetChainAnimalGroup;
|
|
308
|
+
}>;
|
|
309
|
+
readonly PeachFacedLovebird: Readonly<{
|
|
310
|
+
/** Stable code used for application data and locale lookups. */
|
|
311
|
+
key: string;
|
|
312
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
313
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
314
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
315
|
+
scientificName: string;
|
|
316
|
+
group: VetChainAnimalGroup;
|
|
317
|
+
}>;
|
|
318
|
+
readonly Goldfish: Readonly<{
|
|
319
|
+
/** Stable code used for application data and locale lookups. */
|
|
320
|
+
key: string;
|
|
321
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
322
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
323
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
324
|
+
scientificName: string;
|
|
325
|
+
group: VetChainAnimalGroup;
|
|
326
|
+
}>;
|
|
327
|
+
readonly CommonCarp: Readonly<{
|
|
328
|
+
/** Stable code used for application data and locale lookups. */
|
|
329
|
+
key: string;
|
|
330
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
331
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
332
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
333
|
+
scientificName: string;
|
|
334
|
+
group: VetChainAnimalGroup;
|
|
335
|
+
}>;
|
|
336
|
+
readonly Betta: Readonly<{
|
|
337
|
+
/** Stable code used for application data and locale lookups. */
|
|
338
|
+
key: string;
|
|
339
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
340
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
341
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
342
|
+
scientificName: string;
|
|
343
|
+
group: VetChainAnimalGroup;
|
|
344
|
+
}>;
|
|
345
|
+
readonly Guppy: Readonly<{
|
|
346
|
+
/** Stable code used for application data and locale lookups. */
|
|
347
|
+
key: string;
|
|
348
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
349
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
350
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
351
|
+
scientificName: string;
|
|
352
|
+
group: VetChainAnimalGroup;
|
|
353
|
+
}>;
|
|
354
|
+
readonly Zebrafish: Readonly<{
|
|
355
|
+
/** Stable code used for application data and locale lookups. */
|
|
356
|
+
key: string;
|
|
357
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
358
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
359
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
360
|
+
scientificName: string;
|
|
361
|
+
group: VetChainAnimalGroup;
|
|
362
|
+
}>;
|
|
363
|
+
readonly NileTilapia: Readonly<{
|
|
364
|
+
/** Stable code used for application data and locale lookups. */
|
|
365
|
+
key: string;
|
|
366
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
367
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
368
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
369
|
+
scientificName: string;
|
|
370
|
+
group: VetChainAnimalGroup;
|
|
371
|
+
}>;
|
|
372
|
+
readonly AtlanticSalmon: Readonly<{
|
|
373
|
+
/** Stable code used for application data and locale lookups. */
|
|
374
|
+
key: string;
|
|
375
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
376
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
377
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
378
|
+
scientificName: string;
|
|
379
|
+
group: VetChainAnimalGroup;
|
|
380
|
+
}>;
|
|
381
|
+
readonly RainbowTrout: Readonly<{
|
|
382
|
+
/** Stable code used for application data and locale lookups. */
|
|
383
|
+
key: string;
|
|
384
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
385
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
386
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
387
|
+
scientificName: string;
|
|
388
|
+
group: VetChainAnimalGroup;
|
|
389
|
+
}>;
|
|
390
|
+
readonly CentralBeardedDragon: Readonly<{
|
|
391
|
+
/** Stable code used for application data and locale lookups. */
|
|
392
|
+
key: string;
|
|
393
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
394
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
395
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
396
|
+
scientificName: string;
|
|
397
|
+
group: VetChainAnimalGroup;
|
|
398
|
+
}>;
|
|
399
|
+
readonly BallPython: Readonly<{
|
|
400
|
+
/** Stable code used for application data and locale lookups. */
|
|
401
|
+
key: string;
|
|
402
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
403
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
404
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
405
|
+
scientificName: string;
|
|
406
|
+
group: VetChainAnimalGroup;
|
|
407
|
+
}>;
|
|
408
|
+
readonly CornSnake: Readonly<{
|
|
409
|
+
/** Stable code used for application data and locale lookups. */
|
|
410
|
+
key: string;
|
|
411
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
412
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
413
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
414
|
+
scientificName: string;
|
|
415
|
+
group: VetChainAnimalGroup;
|
|
416
|
+
}>;
|
|
417
|
+
readonly LeopardGecko: Readonly<{
|
|
418
|
+
/** Stable code used for application data and locale lookups. */
|
|
419
|
+
key: string;
|
|
420
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
421
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
422
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
423
|
+
scientificName: string;
|
|
424
|
+
group: VetChainAnimalGroup;
|
|
425
|
+
}>;
|
|
426
|
+
readonly RedEaredSlider: Readonly<{
|
|
427
|
+
/** Stable code used for application data and locale lookups. */
|
|
428
|
+
key: string;
|
|
429
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
430
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
431
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
432
|
+
scientificName: string;
|
|
433
|
+
group: VetChainAnimalGroup;
|
|
434
|
+
}>;
|
|
435
|
+
readonly GreekTortoise: Readonly<{
|
|
436
|
+
/** Stable code used for application data and locale lookups. */
|
|
437
|
+
key: string;
|
|
438
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
439
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
440
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
441
|
+
scientificName: string;
|
|
442
|
+
group: VetChainAnimalGroup;
|
|
443
|
+
}>;
|
|
444
|
+
readonly Axolotl: Readonly<{
|
|
445
|
+
/** Stable code used for application data and locale lookups. */
|
|
446
|
+
key: string;
|
|
447
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
448
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
449
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
450
|
+
scientificName: string;
|
|
451
|
+
group: VetChainAnimalGroup;
|
|
452
|
+
}>;
|
|
453
|
+
readonly HoneyBee: Readonly<{
|
|
454
|
+
/** Stable code used for application data and locale lookups. */
|
|
455
|
+
key: string;
|
|
456
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
457
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
458
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
459
|
+
scientificName: string;
|
|
460
|
+
group: VetChainAnimalGroup;
|
|
461
|
+
}>;
|
|
462
|
+
readonly DomesticSilkworm: Readonly<{
|
|
463
|
+
/** Stable code used for application data and locale lookups. */
|
|
464
|
+
key: string;
|
|
465
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
466
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
467
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
468
|
+
scientificName: string;
|
|
469
|
+
group: VetChainAnimalGroup;
|
|
470
|
+
}>;
|
|
471
|
+
}>;
|
|
472
|
+
export type VetChainDomesticAnimalSpeciesKey = keyof typeof VetChainDomesticAnimalSpecies;
|
|
473
|
+
export declare const VetChainDomesticAnimalSpeciesList: readonly Readonly<{
|
|
474
|
+
/** Stable code used for application data and locale lookups. */
|
|
475
|
+
key: string;
|
|
476
|
+
/** Authoritative NCBI Taxonomy identifier, stored without zero padding. */
|
|
477
|
+
ncbiTaxonomyId: NcbiTaxonomyId;
|
|
478
|
+
/** NCBI scientific name. This is reference data, not localized UI copy. */
|
|
479
|
+
scientificName: string;
|
|
480
|
+
group: VetChainAnimalGroup;
|
|
481
|
+
}>[];
|
|
482
|
+
export declare function findVetChainSpeciesByTaxonomyId(value: string): VetChainSpeciesDefinition | undefined;
|
|
483
|
+
/** The current printed card layout can embed only NCBI Taxonomy IDs of at most five digits. */
|
|
484
|
+
export declare function isVetChainSpeciesCode5Compatible(value: string): boolean;
|
package/dist/species.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Copyright 2026 Connecting Solution & Applications Ltd under the Apache License, Version 2.0.
|
|
2
|
+
function species(key, ncbiTaxonomyId, scientificName, group) {
|
|
3
|
+
if (!/^[1-9]\d*$/.test(ncbiTaxonomyId) || ncbiTaxonomyId === "9606") {
|
|
4
|
+
throw new TypeError("A species requires a positive, non-human NCBI Taxonomy identifier.");
|
|
5
|
+
}
|
|
6
|
+
return Object.freeze({ key, ncbiTaxonomyId, scientificName, group });
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Governed starter catalogue for domesticated and commonly kept animals.
|
|
10
|
+
*
|
|
11
|
+
* This is deliberately extensible: VetChain accepts other verified non-human
|
|
12
|
+
* NCBI Taxonomy identifiers without pretending that any static list can cover
|
|
13
|
+
* every species kept in every jurisdiction. Localized common names belong in
|
|
14
|
+
* portal i18n and use these stable keys.
|
|
15
|
+
*/
|
|
16
|
+
export const VetChainDomesticAnimalSpecies = Object.freeze({
|
|
17
|
+
Dog: species("Dog", "9615", "Canis lupus familiaris", "companion-mammal"),
|
|
18
|
+
Cat: species("Cat", "9685", "Felis catus", "companion-mammal"),
|
|
19
|
+
Rabbit: species("Rabbit", "9986", "Oryctolagus cuniculus", "companion-mammal"),
|
|
20
|
+
DomesticFerret: species("DomesticFerret", "9669", "Mustela putorius furo", "companion-mammal"),
|
|
21
|
+
DomesticGuineaPig: species("DomesticGuineaPig", "10141", "Cavia porcellus", "companion-mammal"),
|
|
22
|
+
GoldenHamster: species("GoldenHamster", "10036", "Mesocricetus auratus", "companion-mammal"),
|
|
23
|
+
ChineseHamster: species("ChineseHamster", "10029", "Cricetulus griseus", "companion-mammal"),
|
|
24
|
+
HouseMouse: species("HouseMouse", "10090", "Mus musculus", "companion-mammal"),
|
|
25
|
+
NorwayRat: species("NorwayRat", "10116", "Rattus norvegicus", "companion-mammal"),
|
|
26
|
+
AfricanPygmyHedgehog: species("AfricanPygmyHedgehog", "9368", "Atelerix albiventris", "companion-mammal"),
|
|
27
|
+
Horse: species("Horse", "9796", "Equus caballus", "equid-camelid"),
|
|
28
|
+
Donkey: species("Donkey", "9793", "Equus asinus", "equid-camelid"),
|
|
29
|
+
Llama: species("Llama", "9844", "Lama glama", "equid-camelid"),
|
|
30
|
+
Alpaca: species("Alpaca", "30538", "Vicugna pacos", "equid-camelid"),
|
|
31
|
+
DromedaryCamel: species("DromedaryCamel", "9838", "Camelus dromedarius", "equid-camelid"),
|
|
32
|
+
BactrianCamel: species("BactrianCamel", "9837", "Camelus bactrianus", "equid-camelid"),
|
|
33
|
+
DomesticCattle: species("DomesticCattle", "9913", "Bos taurus", "livestock"),
|
|
34
|
+
ZebuCattle: species("ZebuCattle", "9915", "Bos indicus", "livestock"),
|
|
35
|
+
WaterBuffalo: species("WaterBuffalo", "89462", "Bubalus bubalis", "livestock"),
|
|
36
|
+
DomesticYak: species("DomesticYak", "30521", "Bos grunniens", "livestock"),
|
|
37
|
+
Goat: species("Goat", "9925", "Capra hircus", "livestock"),
|
|
38
|
+
Sheep: species("Sheep", "9940", "Ovis aries", "livestock"),
|
|
39
|
+
Pig: species("Pig", "9823", "Sus scrofa", "livestock"),
|
|
40
|
+
Reindeer: species("Reindeer", "9870", "Rangifer tarandus", "livestock"),
|
|
41
|
+
Chicken: species("Chicken", "9031", "Gallus gallus", "bird"),
|
|
42
|
+
Turkey: species("Turkey", "9103", "Meleagris gallopavo", "bird"),
|
|
43
|
+
DomesticDuck: species("DomesticDuck", "8839", "Anas platyrhynchos", "bird"),
|
|
44
|
+
DomesticGoose: species("DomesticGoose", "8843", "Anser anser", "bird"),
|
|
45
|
+
RockPigeon: species("RockPigeon", "8932", "Columba livia", "bird"),
|
|
46
|
+
Budgerigar: species("Budgerigar", "13146", "Melopsittacus undulatus", "bird"),
|
|
47
|
+
Cockatiel: species("Cockatiel", "13180", "Nymphicus hollandicus", "bird"),
|
|
48
|
+
Canary: species("Canary", "9135", "Serinus canaria", "bird"),
|
|
49
|
+
PeachFacedLovebird: species("PeachFacedLovebird", "60468", "Agapornis roseicollis", "bird"),
|
|
50
|
+
Goldfish: species("Goldfish", "7957", "Carassius auratus", "aquatic"),
|
|
51
|
+
CommonCarp: species("CommonCarp", "7962", "Cyprinus carpio", "aquatic"),
|
|
52
|
+
Betta: species("Betta", "158456", "Betta splendens", "aquatic"),
|
|
53
|
+
Guppy: species("Guppy", "8081", "Poecilia reticulata", "aquatic"),
|
|
54
|
+
Zebrafish: species("Zebrafish", "7955", "Danio rerio", "aquatic"),
|
|
55
|
+
NileTilapia: species("NileTilapia", "8128", "Oreochromis niloticus", "aquatic"),
|
|
56
|
+
AtlanticSalmon: species("AtlanticSalmon", "8030", "Salmo salar", "aquatic"),
|
|
57
|
+
RainbowTrout: species("RainbowTrout", "8022", "Oncorhynchus mykiss", "aquatic"),
|
|
58
|
+
CentralBeardedDragon: species("CentralBeardedDragon", "103695", "Pogona vitticeps", "reptile-amphibian"),
|
|
59
|
+
BallPython: species("BallPython", "51751", "Python regius", "reptile-amphibian"),
|
|
60
|
+
CornSnake: species("CornSnake", "94885", "Pantherophis guttatus", "reptile-amphibian"),
|
|
61
|
+
LeopardGecko: species("LeopardGecko", "481883", "Eublepharis macularius", "reptile-amphibian"),
|
|
62
|
+
RedEaredSlider: species("RedEaredSlider", "31138", "Trachemys scripta elegans", "reptile-amphibian"),
|
|
63
|
+
GreekTortoise: species("GreekTortoise", "86975", "Testudo graeca", "reptile-amphibian"),
|
|
64
|
+
Axolotl: species("Axolotl", "8296", "Ambystoma mexicanum", "reptile-amphibian"),
|
|
65
|
+
HoneyBee: species("HoneyBee", "7460", "Apis mellifera", "managed-invertebrate"),
|
|
66
|
+
DomesticSilkworm: species("DomesticSilkworm", "7091", "Bombyx mori", "managed-invertebrate"),
|
|
67
|
+
});
|
|
68
|
+
export const VetChainDomesticAnimalSpeciesList = Object.freeze(Object.values(VetChainDomesticAnimalSpecies));
|
|
69
|
+
export function findVetChainSpeciesByTaxonomyId(value) {
|
|
70
|
+
const normalized = value.trim();
|
|
71
|
+
return VetChainDomesticAnimalSpeciesList.find((entry) => entry.ncbiTaxonomyId === normalized);
|
|
72
|
+
}
|
|
73
|
+
/** The current printed card layout can embed only NCBI Taxonomy IDs of at most five digits. */
|
|
74
|
+
export function isVetChainSpeciesCode5Compatible(value) {
|
|
75
|
+
return /^[1-9]\d{0,4}$/.test(value) && value !== "9606";
|
|
76
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# vet-data-utils-ts
|
|
2
|
+
|
|
3
|
+
Browser-safe, transport-neutral VetChain data contracts shared by GW VET and
|
|
4
|
+
`vet-sdk-core-ts`. The package owns governed values and validation only; GW VET
|
|
5
|
+
owns authorization and the SDK owns request construction.
|
|
6
|
+
|
|
7
|
+
Current surfaces cover the canonical animal-card DID, veterinary summary
|
|
8
|
+
sections, animal-only emergency data, pseudonymous DigitalTwin search input and
|
|
9
|
+
veterinary assistant intents.
|
|
10
|
+
|
|
11
|
+
The catalogue retains longitudinal sections that also apply to animal care,
|
|
12
|
+
with animal-facing labels where needed. Human advance directives
|
|
13
|
+
(`LOINC|42348-3`) are deliberately excluded because they express the patient's
|
|
14
|
+
own legal/autonomy decisions, not controller preferences.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type VetChainAnimalCardIdentity = Readonly<{
|
|
2
|
+
did: string;
|
|
3
|
+
host: string;
|
|
4
|
+
jurisdictionCode5: string;
|
|
5
|
+
animalNumericId15: string;
|
|
6
|
+
checkDigit1: string;
|
|
7
|
+
animalId16: string;
|
|
8
|
+
cardNumber21: string;
|
|
9
|
+
}>;
|
|
10
|
+
/** Parses only the current VetChain card DID; legacy UHC animal aliases are rejected. */
|
|
11
|
+
export declare function parseVetChainAnimalCardDid(value: unknown): VetChainAnimalCardIdentity;
|
|
12
|
+
export declare function isVetChainAnimalCardDid(value: unknown): value is string;
|
|
13
|
+
/** Returns the Damm digit that makes the complete decimal card validate to zero. */
|
|
14
|
+
export declare function computeVetChainDammCheckDigit(value: string): string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const CARD_DID = /^did:web:([^:]+):card:vetchain:(\d{5}):(\d{16})$/i;
|
|
2
|
+
/** Parses only the current VetChain card DID; legacy UHC animal aliases are rejected. */
|
|
3
|
+
export function parseVetChainAnimalCardDid(value) {
|
|
4
|
+
const did = String(value || '').trim();
|
|
5
|
+
const match = CARD_DID.exec(did);
|
|
6
|
+
if (!match)
|
|
7
|
+
throw new TypeError('vet_animal_card_did_invalid');
|
|
8
|
+
const [, host, jurisdictionCode5, animalId16] = match;
|
|
9
|
+
const cardNumber21 = `${jurisdictionCode5}${animalId16}`;
|
|
10
|
+
return Object.freeze({
|
|
11
|
+
did,
|
|
12
|
+
host: host.toLowerCase(),
|
|
13
|
+
jurisdictionCode5,
|
|
14
|
+
animalNumericId15: animalId16.slice(0, 15),
|
|
15
|
+
checkDigit1: animalId16.slice(15),
|
|
16
|
+
animalId16,
|
|
17
|
+
cardNumber21,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export function isVetChainAnimalCardDid(value) {
|
|
21
|
+
try {
|
|
22
|
+
parseVetChainAnimalCardDid(value);
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Returns the Damm digit that makes the complete decimal card validate to zero. */
|
|
30
|
+
export function computeVetChainDammCheckDigit(value) {
|
|
31
|
+
if (!/^\d+$/.test(value))
|
|
32
|
+
throw new TypeError('vet_animal_card_damm_input_invalid');
|
|
33
|
+
let interim = 0;
|
|
34
|
+
for (const digit of value)
|
|
35
|
+
interim = DAMM_TABLE[interim][Number(digit)];
|
|
36
|
+
return String(interim);
|
|
37
|
+
}
|
|
38
|
+
const DAMM_TABLE = [
|
|
39
|
+
[0, 3, 1, 7, 5, 9, 8, 6, 4, 2], [7, 0, 9, 2, 1, 5, 4, 8, 6, 3],
|
|
40
|
+
[4, 2, 0, 6, 8, 7, 1, 3, 5, 9], [1, 7, 5, 0, 9, 8, 3, 4, 2, 6],
|
|
41
|
+
[6, 1, 2, 3, 0, 4, 5, 9, 7, 8], [3, 6, 7, 4, 2, 0, 9, 5, 8, 1],
|
|
42
|
+
[5, 8, 6, 9, 7, 2, 0, 1, 3, 4], [8, 9, 4, 5, 3, 6, 2, 0, 1, 7],
|
|
43
|
+
[9, 4, 3, 8, 6, 1, 7, 2, 0, 5], [2, 5, 8, 1, 4, 3, 6, 7, 9, 0],
|
|
44
|
+
];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const VeterinaryAssistantIntents: Readonly<{
|
|
2
|
+
readonly ExplainAnimalIdentity: "explain-animal-identity";
|
|
3
|
+
readonly ExplainPermissions: "explain-permissions";
|
|
4
|
+
readonly ExplainEmergencyAccess: "explain-emergency-access";
|
|
5
|
+
readonly ExplainDigitalTwin: "explain-digital-twin";
|
|
6
|
+
}>;
|
|
7
|
+
export type VeterinaryAssistantIntent = typeof VeterinaryAssistantIntents[keyof typeof VeterinaryAssistantIntents];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const VeterinaryDigitalTwinFormats: Readonly<{
|
|
2
|
+
readonly Api: "org.hl7.fhir.api";
|
|
3
|
+
readonly R4: "org.hl7.fhir.r4";
|
|
4
|
+
}>;
|
|
5
|
+
export type VeterinaryDigitalTwinFormat = typeof VeterinaryDigitalTwinFormats[keyof typeof VeterinaryDigitalTwinFormats];
|
|
6
|
+
export type VeterinaryDigitalTwinSearch = Readonly<{
|
|
7
|
+
section: string;
|
|
8
|
+
resourceType: string;
|
|
9
|
+
claim: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}>;
|
|
12
|
+
/** Bounds one section-first pseudonymous search and rejects direct identifiers. */
|
|
13
|
+
export declare function parseVeterinaryDigitalTwinSearch(input: unknown): VeterinaryDigitalTwinSearch;
|