🧬 Examples of calls to the Pasientens prøvesvar (PPS) API (TEST environments) 🧪

This page shows examples of API calls to Pasientens prøvesvar (PPS). 📡

🚨 Please note that PPS is under development, and the examples may not be up-to-date.

NOTE: This is a selection of example queries to support developers in the startup phase. See PPS's FHIR profile on HL7 Github for more details on the Fhir output.

📅 Last updated August 13, 2025

🛠 Basic

🌐 Base URL

Base URLs available for our API can be found on the environments and base URLs page.

📬 Headers

Depending on the base URL used, see

📦 Body

x-www-form-urlencoded for most endpoints.

🌐 Endpoints

Available endpoints and how to use them can be found on the endpoints page.

🌟 Examples

A. Get resource of specified type

📝 A.1. Format

  • Method: POST
  • URL: <base-url>/{resourceType}/_search
  • Body: (empty)

🔍 A.1.1. Example Endpoint 1 - All DiagnosticReport for Gry Telokk outside proxy

  • Method: POST
  • URL: <backdoor-url>/DiagnosticReport/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

📦Body: (empty)

🔍 A.1.2. Example Endpoint 2 - All Observation for Gry Telokk via proxy

  • Method: POST
  • URL: <public-url>/Observation/_search

📬Headers:

Name Value
Person-Id 12057900499

📦Body: (empty)

B. Get specific resource by id

📝 B.1. Format

  • Method: POST
  • URL: <base-url>/{resourceType}/_search
  • Body (x-www-form-urlencoded): _id: {guid}

🔍 B.1.1. Example Endpoint 1 - Specific Specimen for Gry Telokk outside proxy

  • Method: POST
  • URL: <backdoor-url>/Specimen/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

📦Body (x-www-form-urlencoded):

Key Value
_id {guid}

🔍 B.1.2. Example Endpoint 2 - Specific DiagnosticReport for Gry Telokk via proxy

  • Method: POST
  • URL: <public-url>/DiagnosticReport/_search

📬Headers:

Name Value
Person-Id 12057900499

📦Body (x-www-form-urlencoded):

Key Value
_id {guid}

C. Skip and count

If neither are specified, _skip defaults to 0 and count defaults to 50. The maximum allowed value for count is 5000. If _count is explicitly set to 0 the request will return the total count of available data for the query without contents.

Note that both the default count and maximum allowed value for count are subject to change and should not be depended upon for client functionality.

🔍 C.1.1. Example Endpoint 1 - Skip 50 DiagnosticReport and show 10 for Gry Telokk outside proxy

  • Method: POST
  • URL: <backdoor-url>/DiagnosticReport/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

📦Body (x-www-form-urlencoded):

Key Value Default
_count 10 50
_skip 50 0

📝 D.1. Format

  • Method: POST
  • URL: <base-url>/{resourceType}/_search
  • Body (x-www-form-urlencoded): _include: {relation (string)}

🔍 D.1.1. Example Endpoint 1 - All DiagnosticReport for Gry Telokk with associated Observations outside proxy

  • Method: POST
  • URL: <backdoor-url>/DiagnosticReport/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

📦Body (x-www-form-urlencoded):

Key Value
_include DiagnosticReport:result

E. Date and date intervals

🔍 E.1.1. Example Endpoint 1 - All Observations for Gry Telokk from 14.01.2017

  • Method: POST
  • URL: <backdoor-url>/Observation/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

📦Body (x-www-form-urlencoded):

Key Value
date gt2017-01-14

F. Search on meta tag

📝 F.1. Format

  • Method: POST
  • URL: <base-url>/{resourceType}/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

Body (x-www-form-urlencoded):

Key Value
_tag {string(code)}

🔍 F.1.1 Example Endpoint 1 - Search on Observations for Gry Telokk containing Meta Tag "Findings and examination results"

  • Method: POST
  • URL: <backdoor-url>/Observation/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

📦Body (x-www-form-urlencoded):

Key Value
_tag FU

📝 G.1. Format

  • Method: POST
  • URL: <backdoor-url>/DiagnosticReport/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

Body (x-www-form-urlencoded):

Key Value
_include DiagnosticReport:based-on

H. Requester for DiagnosticReport

📝 H.1. Format

  • Method: POST
  • URL: <backdoor-url>/DiagnosticReport/_search

📬Headers:

Name Value
x-nilar-patient 12057900499
x-nilar-requester-hpr 4128168

Body (x-www-form-urlencoded):

Key Value
_include DiagnosticReport:based-on
_include:iterate ServiceRequest:requester