Find a single pregnancy
Overview
The BadgerNet Spine offers an API to write and read FHIR data to/from individual pregnancy records. As such, every Spine request to a pregnancy record must include an identifier which uniquely identifies a single pregnancy; in FHIR terminology, this is known as the record’s Logical ID.
In order for a Spine Client System to obtain the Logical ID of a pregnancy, it must first query the Spine, passing a set of keys within the body of the request which uniquely identify the pregnancy. This set of keys are in the form of a Parameters FHIR resource.
NOTE: This $find-pregnancy API function is only available to ‘MAT’ Spine Client Type. Other Spine Client Types should use the $find-pregnancies API function.
Request
POST [baseUrl]/Patient/$find-pregnancy
The Parameters FHIR resource within the body of the request consists of three key request parameters (National ID, DOB, and EDD):
national-id | (FHIR Identifier) National single-person healthcare identifier. Must be an exact match, and include the corresponding FHIR Identifier System (e.g. for NZ: “https://standards.digital.health.nz/ns/nhi-id”). |
---|---|
dob | (FHIR Date) Date of Birth of the pregnant person. Must be an exact match to the pregnant person’s date of birth. |
edd | (FHIR Date) Agreed Estimated Date of Delivery. Matches a single pregnancy by being within 21 days on either side of the currently stored EDD for that record. |
break-glass-reason | In addition to the query parameters for identifying the pregnancy, a Break Glass Reason parameter must be included to indicate the reason that access to the patient’s record is being requested: (String) The justification for access to the patient’s pregnancy record. This reason will be stored as a Break Glass note within the BadgerNet pregnancy record, should one be required. |
Request Flow

Request Flow - Find a pregnancy
Response
In response to the query, a FHIR Bundle is returned containing a Patient resource (in FHIR Summary form) and the corresponding EDD Observation for the pregnancy. The Logical ID of the single pregnancy is present within the Patient resource, however for the convenience of clients, it is also returned within the response headers of the request.
Possible response codes
Code | Description |
---|---|
200 | Pregnancy record found |
404 | Not Found |
422 | Unprocessable Entity |
Example
Request Body
{
"resourceType": "Parameters",
"parameter": [
{
"name": "national-id",
"valueIdentifier": {
"use": "official",
"system": "https://fhir.nhs.uk/Id/nhs-number",
"value": "NationalID123"
}
},
{
"name": "dob",
"valueDate": "1986-11-01"
},
{
"name": "edd",
"valueDate": "2023-07-23"
},
{
"name": "break-glass-reason",
"valueString": "This is the Break Glass reason"
}
]
}
Response
Header
Header Code | Description |
---|---|
200 | Pregnancy summary has been successfully retrieved |
Body
{
"resourceType": "Bundle",
"id": "3b63764c-e362-455c-add2-301b1639f626",
"meta": {
"lastUpdated": "2022-11-30T17:36:06.802808+00:00"
},
"type": "searchset",
"entry": [
{
"resource": {
"resourceType": "Patient",
"id": "56628828-45ac-4a12-868a-96a220b37e07",
"meta": {
"versionId": "1",
"lastUpdated": "2022-11-30T17:36:06.307+00:00",
"tag": [
{
"system": "http://hl7.org/fhir/v3/ObservationValue",
"code": "SUBSETTED"
}
]
},
"identifier": [
{
"use": "official",
"system": "https://fhir.nhs.uk/Id/nhs-number",
"value": "NationalID123"
}
],
"name": [
{
"use": "official",
"family": "Solis",
"given": [
"Gabrielle"
]
}
],
"birthDate": "1986-11-01",
"address": [
{
"use": "home"
}
]
}
},
{
"resource": {
"resourceType": "Observation",
"id": "0e1aeb21fbcca02fb0e1619259c5d3cadc839066ae3ec744a8b1d0d175c5b618",
"meta": {
"versionId": "1",
"lastUpdated": "2022-11-30T17:36:06.429+00:00",
"profile": [
"https://clevermed.com/fhir/StructureDefinition/BNetPregObs_EDDAgreed"
]
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
"valueReference": {
"reference": "EpisodeOfCare/56628828-45ac-4a12-868a-96a220b37e07"
}
}
],
"status": "final",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "161714006",
"display": "Agreed EDD"
}
]
},
"subject": {
"reference": "Patient/56628828-45ac-4a12-868a-96a220b37e07"
},
"valueDateTime": "2023-07-03"
}
}
]
}