Publisert - 23.11.2026

Birth notification via service bus

The clinical system sends the birth notification as an XML message (SkdirFodselsMelding) on the NHN Service Bus. The birth notification service (also called the Birth Notification System, FMS) fetches the notification, validates it, stores it and replies with an AppRec (application receipt). The notification is then forwarded asynchronously to the National Population Register (Folkeregisteret) at the Norwegian Tax Administration (Skatteetaten) for assignment of the national identification number (NIN).

Flow

sequenceDiagram
    participant EPJ as Clinical system (EPJ)
    participant FMS as Birth notification (FMS)
    participant FREG as Population Register (Tax Administration)

    Note over EPJ, FMS: Synchronous – approval
    EPJ->>+FMS: SkdirFodselsMelding on the queue (Her-ID)
    FMS-->>-EPJ: AppRec (OK or Rejected)

    Note over FMS, FREG: Asynchronous – registration
    FMS->>+FREG: Register birth (foedsel_v1)
    FREG-->>-FMS: Decision + NIN (via feed)

    Note over EPJ, FMS: Asynchronous – delivery of the NIN
    FMS-->>EPJ: Person object with NIN on the topic queue

Note: The AppRec is sent as soon as the notification is approved and stored. An OK AppRec does not mean that the child has received a NIN – the NIN is received later via the topic queue.

Birth notifications are queued to FMS on the NHN Service Bus:

  • Production: Her-ID 116176 (Birth notification/NIN assignment – production)
  • Test: Her-ID 8093545 (Birth notification/NIN assignment – Birth notification test)

One birth notification per child is sent. For a multiple birth, one notification is sent per child, and the pluralitet field specifies the order and the number.

Message format

The notification is XML with the root element SkdirFodselsMelding, consisting of Meldingsinfo, Barnet, foreldre and Signaturinfo. The format is documented in the XSD.

The service validates the notification's mandatory fields and formats (see Validation), but does not perform strict XSD validation of the whole notification. The XSD should therefore be regarded as a description of the format, not as a strict validation basis.

Reference and helping number (H-number) of the child

There must be a unique reference per birth notification. The reference must contain an internal helping number for the child, and it follows the notification through the entire process. The reference is set in the referanseDenneMelding field:

<referanseDenneMelding>000974631776000118512554152001</referanseDenneMelding>

For a full sample notification, see fodselsmelding.

The reference must have content and be at most 30 characters. It is an old format consisting of organisation number, department number, H-number and serial number, built as follows:

Figure of the reference number in the birth notification

  • Organisation number: 12 characters, 3 leading zeros and 9 characters for the organisation number
  • Department number: 4 characters, 2 leading zeros and 2 characters for the department
  • H-number of the child: 11 characters
  • Serial number: 3 characters with leading zeros (001 first, 002 for a correction)

The H-number is validated against the child's date of birth.

ℹ️ Helseplattformen submits an H-number in its own format from its solution. This is not validated against the date of birth.

Rules for the reference

  • referanseDenneMelding must be unique – a reference that has been used before is rejected.
  • referanseDenneMelding must not be equal to referanseTidligereMelding.
  • The serial number is incremented on correction (001 → 002 → ...).
  • A change that changes the child's H-number (e.g. gender) results in a new H-number in the reference.

Correcting a previous birth

A correction is sent as a new birth notification where the referanseTidligereMelding field points to the reference of the notification being corrected. Requirements:

  • referanseTidligereMelding must refer to an existing notification.
  • The original notification must not already have been corrected by another notification.
  • referanseDenneMelding must be unique and must not be equal to referanseTidligereMelding.

Example: fodselsmelding_endring.

Multiple birth

For a multiple birth, one notification is sent per child. The pluralitet field under Barnet specifies:

  • enkeltFodsel – false for a multiple birth
  • nr – the position of the child in the birth (1, 2, 3, ...)
  • totalt – the total number of children in the birth (the same value in all notifications for the birth)

The maximum number of children in a birth is 7. Example: fodselsmelding_flerfodsel.

Registration of mother and father

The mother's and father's NIN (NIN/D-number) is validated on receipt:

  • A supplied NIN/D-number must correspond to a person registered in the Person Service. If there is no match, the notification is rejected.
  • The mother's NIN must have the gender female.
  • Date of birth and personal number will be overwritten with data from the Population Register. Information about the mother/father in the notification is primarily there to help with identification and follow-up.

We do not recommend including a personal number if the person is not registered in the Population Register.

This applies to the following fields:

  • SkdirFodselsMelding/foreldre/Mor/personalia/fodselsdato
  • SkdirFodselsMelding/foreldre/Far/personalia/fodselsdato
  • SkdirFodselsMelding/foreldre/Mor/personalia/personnr
  • SkdirFodselsMelding/foreldre/Far/personalia/personnr

Validation

The following is checked before the notification is approved:

Area Check
Reference referanseDenneMelding is mandatory, at most 30 characters, and must be unique. Must not be equal to referanseTidligereMelding.
H-number 11 characters. For the old format, the H-number (checksum and date of birth) is validated against the child's date of birth.
Institution The organisation number must exist in the Business Register (OrgReg). The institution must have a registered e-mail address and address.
Child Date of birth, gender and levendeFodt are mandatory. Multiple birth: nr/totalt must be consistent, at most 7 children.
Parents Mother is mandatory. A supplied NIN/D-number must be structurally valid and must exist in the Person Service. The mother's NIN must have the female gender. Names and street addresses must follow the allowed character sets (see XSD).
Dates The date in the H-number must not be in the future.
Duplication A birth cannot be registered twice for the same mother on the same date. An H-number cannot be used in another birth notification in the same health trust.

AppRec

For more information about what the AppRec is and the standard, see: https://sarepta.helsedir.no/standard/Applikasjonskvittering/1.1

The AppRec is sent back to the sender's response queue (ReplyTo) on the Service Bus as an APPREC message. The CorrelationId in the AppRec corresponds to the CorrelationId in the original notification.

Status and error codes

The AppRec has status 1 (OK) or 2 (Rejected). A rejected AppRec also contains an Error element with an error code (V) and, in the case of a validation error, the error message in OT (OtherInformation).

Error code Description
T01 Unreadable
T02 Invalid XML (validation error – see OT for the error message)
T99 Other format error
S01 Signature error
S02 Invalid certificate
S99 Other error

ℹ️ If the sender sets the AMQP header errorReportEmail on the notification, a negative AppRec is additionally sent as e-mail to this address.

Receiving the NIN (topic)

When the Population Register has processed the notification and approved the birth, the child is assigned a NIN. FMS then publishes a Person object (namespace http://register.nhn.no/PR) with the child's NIN on the "Topic" queue. Each recipient of the topic subscription filters for the notifications that are relevant.

The original reference of the birth notification (referanseDenneMelding) is given as the CorrelationId in the notification placed on the "Topic" queue. Use this to link the Person object to your own birth notification.

  • Example of a Person object: person

Test environment

Use the NHN Service Bus test environment to test submission of birth notifications, and queue the notification to Her-ID: 8093545 (Birth notification/NIN assignment – Birth notification test).

Contact NHN Customer Service to get your own sender queue and "Topic" queue set up for receiving assigned NINs for registered children.

Synthetic test persons

For the test environment, you can use persons from SyntPop as mother and father.

⚠️ Use test persons with +80 as mother and father to get a NIN for the child in the test environment.

SyntPop contains two different types of test persons:

  • Persons with +80 on the birth month.
  • Persons with +65 on the birth month.

Since the birth notification test environment is linked to the Tax Administration's producer test environment, you will get different behaviour depending on the type of test person you use:

  • Persons with +80: The birth notification is accepted by the Tax Administration's test environment, mother/father exist and the NIN is published.
  • Persons with +65: The birth notification is rejected by the Tax Administration's test environment, mother/father do not exist and the NIN is not published.

Søk i Utviklerportalen

Søket er fullført!