Skip to main content

Patient Resource

The FHIR Patient resource is used to represent demographic and administrative information about an individual receiving healthcare services. It provides the core patient details used to identify and associate a patient with clinical resources such as orders, imaging studies, and diagnostic reports.

Within AdvaPACS, Patient resources represent patients registered within the PACS and include information such as the patient’s identifiers, name, date of birth, sex, address, and contact details. For full information on the Patient resource, please refer to the FHIR standard.

Supported Transactions

AdvaPACS supports the following transactions for the Patient resource:

FunctionMethodEndpointDescription
Get PatientGET/Patient/{id}Retrieves a specific Patient resource by its logical ID.
Search PatientsGET/PatientSearches for Patient resources using one or more supported search parameters.
Create PatientPOST/PatientCreates a new Patient resource.
Update PatientPUT/Patient/{id}Updates an existing Patient resource by replacing the full resource.
Patch PatientPATCH/Patient/{id}Updates specific fields of an existing Patient resource without replacing the full resource.

Supported Fields

AdvaPACS supports the following fields for the Patient resource. These fields can be used to represent the demographic and administrative information associated with a patient, including identifiers, names, contact details, addresses, gender, and date of birth.

Please note that the data you receive may be different depending on some features of AdvaPACS you may or may not use like Assigning Authorities or Organisations and Sites.

{
"resourceType": "Patient",
"id": "5635faaf-ce6c-4149-9f11-4e0e42228371",
"identifier": [
{
"system": "https://sgp.api.integration.advapacs.com/fhir/NamingSystem/b489c4b1-4cdb-40b0-8675-5f29967e2c1e",
"value": "ABC123"
}
],
"name": [
{
"family": "Hall",
"given": [
"Steven"
],
"prefix": [
"Mr"
],
"suffix": [
"BaC"
]
}
],
"gender": "male",
"birthDate": "1946-04-07"
}

Examples

The following examples show how to create, retrieve, search, and update Patient resources using the AdvaPACS FHIR API. These examples demonstrate common operations for managing patient demographic and administrative information, including patient identifiers, names, contact details, and other supported attributes.

Get a Patient

A specific Patient can be retrieved using the logical ID assigned to the resource. The response contains the patient's demographic and administrative information, including their identifiers, name, gender, and date of birth.

GET /fhir/R5/Patient/[Patient_ID]
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Accept: application/fhir+json
Host: <FhirEndpoint>

For example, to retrieve a Patient with logical ID 73b48f2c-799e-4d3d-b305-4e71740b65ca:

GET /fhir/R5/Patient/73b48f2c-799e-4d3d-b305-4e71740b65ca
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Accept: application/fhir+json
Host: <FhirEndpoint>

A successful request returns the requested Patient resource:

{
"resourceType": "Patient",
"id": "73b48f2c-799e-4d3d-b305-4e71740b65ca",
"identifier": [
{
"system": "urn:example:nric",
"value": "S1234567A"
}
],
"name": [
{
"family": "Granger",
"given": [
"Hermione",
"Jean"
]
}
],
"gender": "female",
"birthDate": "2000-08-08"
}

Search for Patients

Patient resources can be searched using one or more supported search parameters. Search parameters can be combined to narrow the results returned by the FHIR API. The following search parameters are supported:

ParameterDescriptionExample
identifierSearch by a patient identifier.?identifier=S1234567A
familySearch by the patient's family name.?family=Granger
givenSearch by the patient's given name.?given=Hermione
nameSearch by the patient's name.?name=Granger
birthdateSearch by the patient's date of birth.?birthdate=2000-08-08
genderSearch by the patient's administrative gender.?gender=female

For example, to search for Patients with the identifier S1234567A:

GET /fhir/R5/Patient?identifier=S1234567A
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Accept: application/fhir+json
Host: <FhirEndpoint>

A successful search returns a FHIR Bundle containing the matching Patient resources:

{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"entry": [
{
"resource": {
"resourceType": "Patient",
"id": "73b48f2c-799e-4d3d-b305-4e71740b65ca",
"identifier": [
{
"system": "urn:example:nric",
"value": "S1234567A"
}
],
"name": [
{
"family": "Granger",
"given": [
"Hermione",
"Jean"
]
}
],
"gender": "female",
"birthDate": "2000-08-08"
}
}
]
}

Create a Patient

A new Patient can be created by sending a POST request containing the Patient resource. The resource should include the demographic and administrative information required to identify the patient within AdvaPACS.

The following example creates a Patient with an identifier, name, gender, and date of birth:

POST /fhir/R5/Patient
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Content-Type: application/fhir+json
Accept: application/fhir+json
Host: <FhirEndpoint>
{
"resourceType": "Patient",
"identifier": [
{
"system": "urn:example:nric",
"value": "S1234567A"
}
],
"name": [
{
"family": "Granger",
"given": [
"Hermione",
"Jean"
]
}
],
"gender": "female",
"birthDate": "2000-08-08"
}

A successful request creates the Patient resource and assigns it a logical resource ID:

{
"resourceType": "Patient",
"id": "73b48f2c-799e-4d3d-b305-4e71740b65ca",
"identifier": [
{
"system": "urn:example:nric",
"value": "S1234567A"
}
],
"name": [
{
"family": "Granger",
"given": [
"Hermione",
"Jean"
]
}
],
"gender": "female",
"birthDate": "2000-08-08"
}

Update a Patient

Use a FHIR PUT request to update an existing Patient resource by replacing the complete resource.

The request must include the Patient's existing logical ID and all fields that should be retained. The following example updates a patient's demographic information, including their identifiers, name, gender, and date of birth.

PUT /Patient/73b48f2c-799e-4d3d-b305-4e71740b65ca
Host: <FhirEndpoint>
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Content-Type: application/fhir+json
Accept: application/fhir+json
{
"resourceType": "Patient",
"id": "73b48f2c-799e-4d3d-b305-4e71740b65ca",
"identifier": [
{
"system": "urn:example:nric",
"value": "S1234567A"
}
],
"name": [
{
"family": "Granger",
"given": [
"Hermione",
"Jean"
]
}
],
"gender": "female",
"birthDate": "2000-08-08"
}

A successful request returns the updated Patient resource.

Note

A PUT request replaces the entire Patient resource. Any existing elements that are omitted from the request may be removed from the patient record. If you only need to modify specific fields, consider using a PATCH request instead.

Patch a Patient

Use a FHIR PATCH request to update specific fields of an existing Patient resource without replacing the full resource. This can be used to add or update demographic and administrative information, such as patient identifiers, names, contact details, or addresses.

The following example adds a new patient identifier with the value S1234567A and system urn:example:nric to an existing Patient resource with logical ID 73b48f2c-799e-4d3d-b305-4e71740b65ca.

PATCH /Patient/73b48f2c-799e-4d3d-b305-4e71740b65ca
Host: <FhirEndpoint>
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Content-Type: application/json-patch+json
Accept: application/fhir+json
[
{
"op": "add",
"path": "/identifier/-",
"value": {
"system": "urn:example:nric",
"value": "S1234567A"
}
}
]

If the Patient is successfully updated, AdvaPACS returns a 200 OK response containing the updated Patient resource.

{
"resourceType": "Patient",
"id": "73b48f2c-799e-4d3d-b305-4e71740b65ca",
"identifier": [
{
"system": "urn:example:nric",
"value": "S1234567A"
}
]
}