FHIR R4 endpoints (/fhir/r4)
A read-only FHIR R4 view of the same data is served under /fhir/r4, alongside the REST API. The version is part of the path: a future FHIR R6 API will be served under /fhir/r6 next to R4. There is no unversioned /fhir alias; requests to it return 404. This is a minimal first version: it does not claim full compatibility with the NoMA/H-resept FHIR profiles.
The REST API is the recommended API and where future development happens. The FHIR endpoints exist to ease migration for consumers that already use FHIR; no major development is planned for them. See REST and FHIR for the differences and how the data maps between them.
| Resource | Source | Id |
|---|---|---|
PlanDefinition |
Treatment group | Deterministic UUID v5 (lowercase) over the treatment group business key |
ActivityDefinition |
Distinct treatment id of a treatment alternative | Deterministic UUID v5 (lowercase) over the treatment id |
MedicinalProduct |
Active FEST brand | Deterministic UUID v5 (lowercase) |
MedicinalProductPackaged |
Live article number (Active or Expiring) of an active FEST package | Deterministic UUID v5 (lowercase) for the article number |
MedicinalProductAuthorization |
Reimbursement group | Deterministic UUID v5 (lowercase) over the reimbursement group business key |
The ids of all five resource types are UUID v5 values (RFC 9562) that Legemiddelgrunndata derives from the FEST brand id, the article number, the reimbursement group business key, the treatment group business key and the treatment id. They are stable across syncs, but are not the source ids: the source ids stay in identifier (not emitted for MedicinalProductAuthorization). Treat the ids as opaque; ids from earlier versions return 404.
See Resource models for the elements each resource emits.
GET /fhir/r4/{Resource}(search) andGET /fhir/r4/{Resource}/{id}(read). Resource names and ther4segment are case-sensitive.GET /fhir/r4/metadatareturns the CapabilityStatement and is anonymous.- Resource endpoints use the same HelseID DPoP authentication and
nhn:legemiddelgrunndata/apiscope as the v2 endpoints (see Authentication). - Responses are
application/fhir+json. XML and_formatare not supported (_formatgives400; an Accept header that excludes JSON gives406). An optionalfhirVersionparameter on the Accept header (for exampleapplication/fhir+json; fhirVersion=4.0) is honored: a version other than R4 (4.0.x) gives406. - Errors (
400,401,403,404,405,406,429,500) on/fhirpaths are FHIROperationOutcomeresources. Rate limiting is the same as for the other endpoints.
Search
All five resource endpoints support _id, _lastUpdated, _tag, _type, _profile, _security, _count, _page, _sort, _elements, _summary and _total. _tag, _profile and _security match no resources because the current mappings emit no values for them. _sort supports one field, _lastUpdated, in ascending or descending order.
| Resource | Resource-specific search parameters |
|---|---|
PlanDefinition |
description, identifier, name, publisher, status, type |
ActivityDefinition |
description, identifier, kind, name, publisher, status |
MedicinalProduct |
identifier, name |
MedicinalProductPackaged |
identifier, package-item-type, package-item-quantity, subject |
MedicinalProductAuthorization |
subject |
Search parameter values within one occurrence are ORed when comma-separated; repeated occurrences are ANDed. Supported modifiers include :missing, string :exact/:contains, token :text/:not, and reference :type. Date and quantity parameters support FHIR comparison prefixes. identifier exactly matches value or system|value against identifiers emitted by the resource. FEST identifier values are uppercase Guids and are matched case-sensitively; _id for FEST resources is case-insensitive.
MedicinalProductPackaged.subject can be chained to a MedicinalProduct search parameter. MedicinalProductAuthorization.subject can be chained to supported search parameters on MedicinalProduct or MedicinalProductPackaged. _has is partially supported for mapped subject relationships: packages and authorizations may filter products, and authorizations may filter packaged products, using the source resource's _id, or identifier for MedicinalProductPackaged sources. MedicinalProductAuthorization emits no identifiers and is not searchable by identifier. A chained or _has subquery returning more than 1,000 resources fails with 400 and an OperationOutcome with issue code too-costly. The same applies to MedicinalProductAuthorization searches with subject:missing or subject:type when the other criteria match more than 1,000 authorizations.
Supported _include paths are MedicinalProductPackaged:subject:MedicinalProduct and MedicinalProductAuthorization:subject (optionally targeted to MedicinalProduct or MedicinalProductPackaged). Supported _revinclude paths are MedicinalProductPackaged:subject and MedicinalProductAuthorization:subject on MedicinalProduct, and MedicinalProductAuthorization:subject on MedicinalProductPackaged. Included entries use search.mode=include, are not counted as matches, and are limited to 100 resources with a warning when more are available. :iterate is not supported.
Unsupported parameters are ignored by default. Send Prefer: handling=strict to reject unsupported parameters with 400 and an OperationOutcome; malformed supported parameters always fail with 400. A well-formed search without a match returns an empty searchset.
_count defaults to 10 and is capped at 1,000; a higher requested value is capped and adds a warning entry. Search parameters that are unknown or not supported for the resource are ignored by default and reported as not-supported warning OperationOutcome entries in the bundle; Prefer: handling=strict rejects them instead. _total=accurate returns the number of matching resources in Bundle.total; _total=none or an omitted _total omits it. _elements returns the requested top-level elements plus resourceType, id, meta and the resource's mandatory elements, and marks the resources as subsetted. _summary=true, text, data and false select the corresponding FHIR summary form (text returns text, id, meta and the mandatory elements). _summary=count returns only Bundle.total, without entries or a next link.
Paging uses opaque, query-bound _page cursors. Follow the next link unchanged; filters, sorting, result options, page size and include paths are preserved in paging links. Concurrent data publication can change later pages.
Example
curl -H "Authorization: DPoP <access-token>" -H "DPoP: <proof-jwt>" \
"https://api.example.com/fhir/r4/MedicinalProductAuthorization/e003f0d9-d6a5-55b1-b7e9-0470197fd560"
{
"resourceType": "MedicinalProductAuthorization",
"id": "e003f0d9-d6a5-55b1-b7e9-0470197fd560",
"meta": { "lastUpdated": "2026-01-02T03:04:05+00:00" },
"extension": [
{
"url": "https://simplifier.net/interregionalt-h-resept-prosjekt/reimbursementRegulation",
"valueCodeableConcept": {
"coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.7427", "code": "950", "display": "H-resept" }]
}
},
{
"url": "https://simplifier.net/interregionalt-h-resept-prosjekt/ReimbursementCode",
"valueCodeableConcept": {
"coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.7110", "code": "G35", "display": "Multippel sklerose" }]
}
}
],
"subject": {
"reference": "MedicinalProductPackaged/12c5fe80-b1b4-52dd-a694-5dc3bec21df5",
"type": "MedicinalProductPackaged"
}
}
Resource models
Elements not listed are not emitted. meta carries only lastUpdated. publisher is always
Sykehusinnkjøp HF and status is always active on the resources that have these elements.
Identifier systems
| Identifier | System | Value |
|---|---|---|
| Treatment group | https://pharmasys-api.sykehusinnkjop.no/shiPlanDefinitionId |
Business key |
| Treatment id | https://pharmasys-api.sykehusinnkjop.no/shiActivityDefinitionId |
Treatment id |
| FEST brand | http://legemiddelverket.no/FEST/LegemiddelMerkevareID |
Uppercase Guid |
| FEST package | http://legemiddelverket.no/FEST/LegemiddelPakningID |
Uppercase Guid |
| FEST dose | http://legemiddelverket.no/FEST/LegemiddeldoseID |
Uppercase Guid |
| LMR number | http://legemiddelverket.no/FEST/lmrNummer |
LMR number |
| Article number | https://farmalogg.no/varenummer |
Article number (varenummer) |
PlanDefinition
One resource per treatment group.
| Element | Content |
|---|---|
id |
UUID v5 derived from the treatment group business key |
identifier |
Treatment group business key |
meta.lastUpdated |
Time the group last changed |
name, description |
Group name and description |
type |
http://terminology.hl7.org/CodeSystem/plan-definition-type code clinical-protocol |
lastReviewDate |
Group review date, when set |
effectivePeriod |
Group validity period, when set |
extension https://pharmasys-api.sykehusinnkjop.no/shiDiseaseGroup |
Disease group (valueString), when set |
useContext |
One entry with code jurisdiction whose valueCodeableConcept holds all jurisdiction (RHF) codings |
goal |
One goal: description.text is Gyldig refusjonskode for behandlingsgruppe, and addresses holds all indication codings in one CodeableConcept |
action[] |
One per treatment alternative, ordered by rank: description, extension https://pharmasys-api.sykehusinnkjop.no/shiGuidelineRank (valueInteger), and definitionCanonical ActivityDefinition/{id} when the alternative has a treatment id |
ActivityDefinition
One resource per distinct treatment id. When several treatment groups use the same treatment id, the alternative from the group with the lowest business key is used.
| Element | Content |
|---|---|
id |
UUID v5 derived from the treatment id |
identifier |
Treatment id |
meta.lastUpdated |
Time the owning group last changed |
name, description |
Treatment alternative name and description |
kind |
MedicationRequest |
extension https://simplifier.net/interregionalt-h-resept-prosjekt/shiguidelinemedicinalproduct |
valueReference to each linked active MedicinalProduct |
extension https://simplifier.net/interregionalt-h-resept-prosjekt/shiguidelinepackagedproduct |
valueReference to each linked active MedicinalProductPackaged |
MedicinalProduct
One resource per active FEST brand (LegemiddelMerkevare).
| Element | Content |
|---|---|
id |
UUID v5 derived from the FEST brand id, lowercase |
identifier |
FEST brand id |
name[0].productName |
FEST name, form and strength; data-absent-reason: unknown when missing |
packagedMedicinalProduct[] |
References to the live article numbers of the brand's active packages |
MedicinalProductPackaged
One resource per live article number of an active FEST package (Legemiddelpakning). A package
with a current and an outgoing article number (Varenr and VarenrUtgaende) therefore gives two
resources that share the package data. Expired article numbers are not returned. The id is a
UUID v5 derived from the article number; do not derive meaning from it.
| Element | Content |
|---|---|
id |
UUID v5 for the article number, lowercase |
identifier |
Package id (shared by all article numbers of the package), this resource's article number, ids of linked doses and their distinct LMR numbers |
subject[] |
References to the active brands in the package information |
packageItem[] |
One per FEST package information entry, with a nested packageItem per package component |
packageItem.type |
Package type coding. The FEST OID 2.16.578.1.12.4.1.1.7449 is emitted as https://volven.no/toolws/index.asmx/wsAppInfoSchema?strKveKode=7449; other OIDs as urn:oid:{oid}. data-absent-reason: unknown when missing |
packageItem.quantity.value |
FEST container count, or 1 when FEST omits it. No unit. Medicine amounts (for example 30 tablets) are not container counts |
A package without package information gets one packageItem with an unknown type and
quantity 1. The API does not invent an outer box or SAFEST identifiers.
MedicinalProductAuthorization
One resource per reimbursement group.
| Element | Content |
|---|---|
id |
UUID v5 derived from the reimbursement group business key, lowercase. The business key (leading zeros kept) is not emitted |
meta.lastUpdated |
Time the group last changed |
extension https://simplifier.net/interregionalt-h-resept-prosjekt/reimbursementRegulation |
Legal basis (hjemmel) codings, when set |
extension https://simplifier.net/interregionalt-h-resept-prosjekt/ReimbursementCode |
All indication (diagnosis) codings in one CodeableConcept, when set |
subject |
The group's single active package (its Active article number, otherwise its Expiring one), otherwise its single active brand; omitted when ambiguous or unavailable |
No identifier is emitted.
Limitations
MedicinalProductAuthorizationhas noidentifier.subjectis set only when the group has exactly one active FEST package, otherwise exactly one active brand; it is omitted when ambiguous or unavailable.subjectpoints to one article number, butsubject=MedicinalProductPackaged/<id>, chainedsubjectsearches (for examplesubject:MedicinalProductPackaged.identifier=<article number>),_revinclude=MedicinalProductAuthorization:subjectand_has:MedicinalProductAuthorization:subjectmatch a group through any live article number of its subject package, including the outgoing one.- Like the REST default,
PlanDefinition,ActivityDefinitionandMedicinalProductAuthorizationhide a group that had products but has none in FEST left, and ignore products not in FEST. Hidden groups are absent from search and totals and return404on read. FHIR has no deletions or tombstones, so a group that becomes hidden simply disappears; clients polling with_lastUpdatedwill not see it go. There is no option to include products not in FEST. meta.versionIdis not emitted.meta.lastUpdatedis the time the source row last changed in Legemiddelgrunndata. There are no version reads (vread), history, conditional reads or ETags.- Product references are only emitted when the target is an active FEST product. Treatment ids that are URLs do not produce an
ActivityDefinitionor action reference. - Many optional elements (for example product type, ingredients, marketing and holder information) are omitted; required R4 elements without source data use the
data-absent-reasonextension withunknown.