Examples
Bundle
For more information, see the API docs
Submit a bundle with a Clinical Frailty scale Score (CFS)
Request:
bundle-cfs.json
{
"resourceType": "Bundle",
"meta": {
"tag": [
{
"system": "https://register.geonorge.no/sosi-kodelister/inndelinger/inndelingsbase/kommunenummer",
"code": "0301",
"display": "Oslo"
}
]
},
"identifier": {
"system": "https://www.nhn.no/komlink/bundle-identifier",
"value": "63892166-f577-4db0-90cd-8c9a957c4309"
},
"type": "collection",
"timestamp": "2026-05-21T09:21:33+02:00",
"entry": [
{
"fullUrl": "http://nhn.no/7afbcc18-9fa1-47ab-9a20-94f025057263",
"resource": {
"category": [
{
"coding": [
{
"code": "survey",
"display": "Survey",
"system": "http://terminology.hl7.org/CodeSystem/observation-category"
}
]
}
],
"code": {
"coding": [
{
"code": "763264000",
"display": "CSHA (Canadian Study of Health and Aging) Clinical Frailty Scale score",
"system": "http://snomed.info/sct"
}
]
},
"effectiveDateTime": "",
"id": "aac96c6d-e4b4-4227-9147-224798c432af",
"resourceType": "Observation",
"status": "registered",
"subject": {
"display": "SYNTHESIZED LABORATORY",
"identifier": {
"system": "urn:oid:2.16.578.1.12.4.1.4.1",
"value": "02686525891"
}
},
"valueQuantity": {
"value": 5
}
}
}
]
}
curl --location "https://api.pmd.dev.nhn.no/" \
-H "Content-Type: application/fhir+json" \
-d @bundle-cfs.json
Response:
{
"resourceType": "Bundle",
"type": "batch-response",
"entry": [
{
"response": {
"status": "200"
}
},
]
}
Submit a bundle with an oxygen measurement observation, and a patient
Request:
bundle-oxygen.json
{
"resourceType": "Bundle",
"type": "collection",
"entry": [
{
"resource": {
"category": [
{
"coding": [
{
"code": "vital-signs",
"display": "Vital Signs",
"system": "http://terminology.hl7.org/CodeSystem/observation-category"
}
]
}
],
"code": {
"coding": [
{
"code": "2708-6",
"display": "Oxygen saturation in arterial blood",
"system": "http://loinc.org"
}
]
},
"device": {
"display": "KOMLINK DEVICE",
"identifier": {
"system": "http://komlink.nhn.no/devices/serial",
"value": "SN-2001-54321"
},
"reference": "Device/KL-9000",
"type": "Device"
},
"effectiveInstant": "2025-10-18T11:00:00+02:00",
"id": "6aba8502-793c-4649-8b89-4dd085d8876e",
"issued": "2025-11-07T14:14:13+01:00",
"performer": [
{
"identifier": {
"value": "NHN testdatagenerator"
}
}
],
"referenceRange": [
{
"low": {
"code": "%",
"system": "http://unitsofmeasure.org",
"value": 85.0000000001
},
"type": {
"coding": [
{
"code": "N",
"display": "Normal",
"system": "https://www.hl7.org/fhir/valueset-observation-interpretation.html"
}
]
}
},
{
"high": {
"code": "%",
"system": "http://unitsofmeasure.org",
"value": 85
},
"low": {
"code": "%",
"system": "http://unitsofmeasure.org",
"value": 80.0000000001
},
"type": {
"coding": [
{
"code": "L",
"display": "Low",
"system": "https://www.hl7.org/fhir/valueset-observation-interpretation.html"
}
]
}
},
{
"high": {
"code": "%",
"system": "http://unitsofmeasure.org",
"value": 80
},
"type": {
"coding": [
{
"code": "LL",
"display": "Critical low",
"system": "https://www.hl7.org/fhir/valueset-observation-interpretation.html"
}
]
}
}
],
"resourceType": "Observation",
"status": "registered",
"subject": {
"display": "SYNTHESIZED LABORATORY",
"identifier": {
"system": "urn:oid:2.16.578.1.12.4.1.4.1",
"value": "02686525891"
}
},
"valueQuantity": {
"code": "%",
"system": "http://unitsofmeasure.org",
"value": 91
}
}
},
{
"id": "18838b4e-ed46-4e19-9e42-c3133f29cdfe",
"identifier": [
{
"system": "urn:oid:2.16.578.1.12.4.1.4.1",
"value": "12345678901"
}
],
"name": [
{
"text": "Navn Navnesen"
}
],
"resourceType": "Patient"
}
]
}
curl --location "https://api.pmd.dev.nhn.no/" \
-H "Content-Type: application/fhir+json" \
-d @bundle-oxygen.json
Response:
{
"resourceType": "Bundle",
"type": "batch-response",
"entry": [
{
"response": {
"status": "200"
}
},
{
"response": {
"status": "422"
}
}
]
}
Search
For more information, see the API docs
Find all observations for a patient
curl --location "https://api.pmd.dev.nhn.no/Observation/_search" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'patient.identifier=05755844871'
Find all observations for a patient between two dates
curl --location "https://api.pmd.dev.nhn.no/Observation/_search" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'patient.identifier=05755844871&date=ge2019-10-01&date=le2020-01-01'
Find all observations for a patient from a date
curl --location "https://api.pmd.dev.nhn.no/Observation/_search" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'patient.identifier=05755844871&date=ge2019-10-01'
Find all observations for a patient before (and including) a date
curl --location "https://api.pmd.dev.nhn.no/Observation/_search" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'patient.identifier=13116900216&date=le2020-01-01'
Available test data
Examples of observations of different types available:
| Environment | NIN | Observation type |
|---|---|---|
| Development | 13718405143 | Clinical frailty score |
| Test | 01692027341 | Clinical frailty score |
Read an example of Clinical Frailty Scale score observation
curl --location "https://api.pmd.dev.nhn.no/Observation/_search" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'patient.identifier=13718405143&date=le2000-01-03'
Synthetic National Identity Numbers
In development and test we only accept synthetic NINs. There are two ways to get a synthetic NIN - calculate it yourself or get one through https://syntpop.nhn.no
Calculation
A Synthetic nin can be produced by adding 65 or 80 to the birthmonth and calculating the personnumber.
How to calculate the control digits in the personnumber can be read at skatteetaten
Pre-generated Synthetic NINs
In case you don't want to calculate it yourself - below is a list of syntehtic nins created at https://syntpop.nhn.no that you can use
18727094136
08748923641
18725147739
18720174649
09669318488
22660860820
07729122224
07728117472
26709127658
26700581046
23709191667
13709106508
18679135941
01670191857
21749134205
01668191297
08739844216
20710689823
04690484639
22660660031
05700577459
24760590963
01669199682
06719110736
05709140290
01660072442
01678248181
01678297301
01749125175
01669103170
01678238704
10710687841
29680187094
21679144976
21720782542
01660554765
01669115225
01669125107
01660184941
01749198342
02670297325
01678298529
01678240733
01678208120
01660188378
01660196591
41660136175
01669127975
01669192785
01669126596