vet-sdk-core-ts 0.4.4 → 0.4.5
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 +4 -1
- package/dist/gateway-contract.d.ts +4 -3
- package/dist/gateway-contract.js +8 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,10 @@ findVetChainSpeciesByTaxonomyId("9685")?.key; // "Cat"
|
|
|
66
66
|
`buildVeterinaryDigitalTwinSearchRequest` accepts only one governed section,
|
|
67
67
|
selected resource families, display text and dates. It returns both the FHIR
|
|
68
68
|
`Parameters` body and the `filters` map for `DigitalTwinSdk.search`; callers do
|
|
69
|
-
not author `Composition.section` or resource claim names.
|
|
69
|
+
not author `Composition.section` or resource claim names. The returned public
|
|
70
|
+
resource is `ResearchSubject`, so the Node SDK sends
|
|
71
|
+
`POST digitaltwin/.../ResearchSubject/_search`; the `Composition.*` fields
|
|
72
|
+
filter the canonical Composition embedded in that ResearchSubject.
|
|
70
73
|
|
|
71
74
|
```ts
|
|
72
75
|
const request = buildVeterinaryDigitalTwinSearchRequest({
|
|
@@ -48,7 +48,7 @@ export type VeterinaryBreakGlassSmartAuthorization = Readonly<{
|
|
|
48
48
|
}>;
|
|
49
49
|
export type VeterinaryDigitalTwinSearchRequest = Readonly<{
|
|
50
50
|
format: VeterinaryDigitalTwinFormat;
|
|
51
|
-
resourceType: '
|
|
51
|
+
resourceType: 'ResearchSubject';
|
|
52
52
|
filters: Readonly<Record<string, string | readonly string[]>>;
|
|
53
53
|
payload: Readonly<{
|
|
54
54
|
thid: string;
|
|
@@ -87,8 +87,9 @@ export declare function buildVeterinaryBreakGlassSmartRequest(input: Readonly<{
|
|
|
87
87
|
}>): VeterinaryBreakGlassSmartRequest;
|
|
88
88
|
/**
|
|
89
89
|
* Converts browser-safe search values into both FHIR Parameters and the exact
|
|
90
|
-
* filter map accepted by the Node DigitalTwin SDK.
|
|
91
|
-
*
|
|
90
|
+
* filter map accepted by the Node DigitalTwin SDK. The public twin resource is
|
|
91
|
+
* ResearchSubject; Composition.* filters address its embedded canonical
|
|
92
|
+
* Composition index. Callers never choose flat claim names.
|
|
92
93
|
*/
|
|
93
94
|
export declare function buildVeterinaryDigitalTwinSearchRequest(input: Readonly<{
|
|
94
95
|
thid: string;
|
package/dist/gateway-contract.js
CHANGED
|
@@ -61,8 +61,9 @@ export function buildVeterinaryBreakGlassSmartRequest(input) {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Converts browser-safe search values into both FHIR Parameters and the exact
|
|
64
|
-
* filter map accepted by the Node DigitalTwin SDK.
|
|
65
|
-
*
|
|
64
|
+
* filter map accepted by the Node DigitalTwin SDK. The public twin resource is
|
|
65
|
+
* ResearchSubject; Composition.* filters address its embedded canonical
|
|
66
|
+
* Composition index. Callers never choose flat claim names.
|
|
66
67
|
*/
|
|
67
68
|
export function buildVeterinaryDigitalTwinSearchRequest(input) {
|
|
68
69
|
const search = parseVeterinaryDigitalTwinSearch(input.search);
|
|
@@ -92,14 +93,14 @@ export function buildVeterinaryDigitalTwinSearchRequest(input) {
|
|
|
92
93
|
return Object.freeze({
|
|
93
94
|
format,
|
|
94
95
|
filters: Object.freeze(filters),
|
|
95
|
-
//
|
|
96
|
-
// resource families
|
|
97
|
-
// the asynchronous route resource type.
|
|
98
|
-
resourceType: '
|
|
96
|
+
// ResearchSubject is the public twin. Its embedded canonical Composition
|
|
97
|
+
// indexes the selected nested resource families as repeated Parameters;
|
|
98
|
+
// those filters never change the asynchronous route resource type.
|
|
99
|
+
resourceType: 'ResearchSubject',
|
|
99
100
|
payload: {
|
|
100
101
|
thid: bounded(input.thid, 'thid'),
|
|
101
102
|
body: format === VeterinaryDigitalTwinFormats.Api
|
|
102
|
-
? { data: [{ type: '
|
|
103
|
+
? { data: [{ type: 'ResearchSubject-search-request-v1.0', resource: { resourceType: 'Parameters', parameter } }] }
|
|
103
104
|
: { resourceType: 'Parameters', parameter },
|
|
104
105
|
},
|
|
105
106
|
});
|
package/package.json
CHANGED