Skip to content

Commit 011fcbd

Browse files
authored
Add source markers (#283)
* Add source markers * Add more data * example
1 parent 23c80ee commit 011fcbd

File tree

3 files changed

+68
-28
lines changed

3 files changed

+68
-28
lines changed

docs/api-reference/lab-testing/results/get-results.mdx

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -91,38 +91,30 @@ fmt.Printf("Received data %s\n", response)
9191
},
9292
"results": [
9393
{
94-
"name": "Hemoglobin",
95-
"slug": "hemoglobin",
96-
"unit": "g/dL",
97-
"notes": null,
98-
"value": 18.9, # deprecated
99-
"timestamp": null,
100-
"max_range_value": 17.7,
101-
"min_range_value": 13.0,
102-
"is_above_max_range": true,
103-
"is_below_min_range": false,
104-
"interpretation": "abnormal",
105-
"result": "18.90",
94+
"name": "Sex Horm Binding Glob, Serum",
95+
"slug": "sex-horm-binding-glob-serum",
96+
"value": 30.4,
97+
"result": "30.4",
10698
"type": "numeric",
107-
"loinc": "0001-1",
108-
"loinc_slug": "hemoglobin-mass-vol"
109-
},
110-
{
111-
"name": "Sodium",
112-
"slug": "unknown",
113-
"unit": "mmol/L",
114-
"notes": null,
115-
"value": 136, # deprecated
116-
"timestamp": null,
117-
"max_range_value": 144,
118-
"min_range_value": 134,
99+
"unit": "nmol/L",
100+
"timestamp": "2024-10-31T09:08:00+00:00",
101+
"notes": "Final",
102+
"min_range_value": 24.6,
103+
"max_range_value": 122,
119104
"is_above_max_range": false,
120105
"is_below_min_range": false,
121106
"interpretation": "normal",
122-
"result": "136",
123-
"type": "numeric",
124-
"loinc": "0001-2",
125-
"loinc_slug": "sodium"
107+
"loinc": "13967-5",
108+
"loinc_slug": "sex-hormone-binding-globulin-moles-vol",
109+
"provider_id": "082016",
110+
"source_markers": [
111+
{
112+
"marker_id": 229,
113+
"name": "Testosterone Free, Profile I",
114+
"slug": "testosterone-free-profile-i",
115+
"provider_id": "140226"
116+
}
117+
]
126118
}
127119
]
128120
}

docs/changelog/lab-testing/api.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
title: "API"
33
---
44

5+
### Source Marker Identification for Results (Nov 2024)
6+
Results now feature the source, orderable marker from which they originated.
7+
Refer to the [documentation](/lab/results/result-formats)
8+
9+
10+
511
### PSC Appointment Scheduling API (Oct 2024)
612
Walk-in Phlebotomy orders now allow for appointment booking directly with Vital.
713
Refer to the [documentation](/lab/walk-in/order-lifecycle)

docs/lab/results/result-formats.mdx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ is_below_min_range: bool | None
6666
interpretation: str = Interpretation.NORMAL
6767
loinc: str | None
6868
loinc_slug: str | None
69+
provider_id: str | None
70+
source_markers: List[ParentBiomarkerData] | None
6971
```
7072

7173
#### ResultType
@@ -102,6 +104,7 @@ Interpretation is a string value that can be one of the following:
102104
3. `Interpretation.CRITICAL` - The result is outside of critical parameters.
103105
In this case, refer to the [critical values](/lab/workflow/lab-test-lifecycle#critical-results) section.
104106

107+
105108
#### Standardisation - LOINC
106109

107110
It's possible to test the same biomarkers across different laboratories. For these to match, we use the [LOINC](https://loinc.org/) standard.
@@ -215,6 +218,44 @@ In order to obtain this data, you can use the following endpoints:
215218

216219
This allows you to see all markers associated with a lab test and it's expected results.
217220

221+
#### Source Markers
222+
223+
As mentioned above, a marker can be composed of one or more results. This means that if you order a `Lipid Panel`, there will be no `Lipid Panel` result returned, but instead a series of markers that originate from the `Lipid Panel`.
224+
225+
Vital identifies the source marker via the `source_markers` field.
226+
227+
```json
228+
{
229+
"name": "Sex Horm Binding Glob, Serum",
230+
"slug": "sex-horm-binding-glob-serum",
231+
"value": 30.4,
232+
"result": "30.4",
233+
"type": "numeric",
234+
"unit": "nmol/L",
235+
"timestamp": "2024-10-31T09:08:00+00:00",
236+
"notes": "Final",
237+
"min_range_value": 24.6,
238+
"max_range_value": 122,
239+
"is_above_max_range": false,
240+
"is_below_min_range": false,
241+
"interpretation": "normal",
242+
"loinc": "13967-5",
243+
"loinc_slug": "sex-hormone-binding-globulin-moles-vol",
244+
"provider_id": "082016",
245+
"source_markers": [
246+
{
247+
"marker_id": 229,
248+
"name": "Testosterone Free, Profile I",
249+
"slug": "testosterone-free-profile-i",
250+
"provider_id": "140226"
251+
}
252+
]
253+
},
254+
```
255+
256+
When Vital cannot identify the source, then this field will be `null`, indicating that this is an unsolicited result.
257+
There may also be more than one `source` marker, if there are two or more ordered markers that contain the same underlying result, using the same testing method.
258+
218259

219260
#### Missing Results
220261

@@ -230,6 +271,7 @@ note: str | None = None
230271
loinc: str | None = None
231272
loinc_slug: str | None = None
232273
provider_id: str | None = None
274+
source_markers: List[ParentBiomarkerData] | None = None
233275
```
234276

235277
`inferred_failure_type` is the Vital assigned error type.

0 commit comments

Comments
 (0)