Publisert - 20.11.2026

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 Treatment group business key
ActivityDefinition Distinct treatment id of a treatment alternative Treatment id
MedicinalProduct Active FEST brand FEST id (lowercase Guid)
MedicinalProductPackaged Active FEST package FEST id (lowercase Guid)
MedicinalProductAuthorization Reimbursement group Reimbursement group business key (leading zeros kept, e.g. 000879)

See Resource models for the elements each resource emits.

  • GET /fhir/r4/{Resource} (search) and GET /fhir/r4/{Resource}/{id} (read). Resource names and the r4 segment are case-sensitive.
  • GET /fhir/r4/metadata returns the CapabilityStatement and is anonymous.
  • Resource endpoints use the same HelseID DPoP authentication and nhn:legemiddelgrunndata/api scope as the v2 endpoints (see Authentication).
  • Responses are application/fhir+json. XML and _format are not supported (_format gives 400; an Accept header that excludes JSON gives 406). An optional fhirVersion parameter on the Accept header (for example application/fhir+json; fhirVersion=4.0) is honored: a version other than R4 (4.0.x) gives 406.
  • Errors (400, 401, 403, 404, 405, 406, 429, 500) on /fhir paths are FHIR OperationOutcome resources. Rate limiting is the same as for the other endpoints.

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; the total counts matching database rows, so it can exceed the number of retrievable resources if a source record has a key that is not a valid FHIR id. _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/000879"
{
  "resourceType": "MedicinalProductAuthorization",
  "id": "000879",
  "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/3f2504e0-4f89-11d3-9a0c-0305e82c3301",
    "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, 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/{treatmentId} when the treatment id is a valid FHIR 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, 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 FEST id, lowercase
identifier FEST brand id
name[0].productName FEST name, form and strength; data-absent-reason: unknown when missing
packagedMedicinalProduct[] References to the active packages of the brand

MedicinalProductPackaged

One resource per active FEST package (Legemiddelpakning).

Element Content
id FEST id, lowercase
identifier Package id, article number (when present), 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 Reimbursement group business key (leading zeros kept)
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, otherwise its single active brand; omitted when ambiguous or unavailable

No identifier is emitted.

Limitations

  • MedicinalProductAuthorization has no identifier. subject is set only when the group has exactly one active FEST package, otherwise exactly one active brand; it is omitted when ambiguous or unavailable.
  • Unlike the REST endpoints, groups are not filtered on whether their products are in FEST.
  • meta.versionId is not emitted. meta.lastUpdated is 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 ActivityDefinition or 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-reason extension with unknown.

Søk i Utviklerportalen

Søket er fullført!