New birth message – overview
The new birth message (BirthSystem) is to replace the current birth message. Midwives and attending doctors register births in the system via a REST API, and the system forwards the messages to the National Population Register (Folkeregisteret) at the Norwegian Tax Administration (Skatteetaten) for assignment of the national identification number (NIN).
Important
The new system is separate from the existing one. The systems run in parallel for a period while consumers migrate from the old system to the new one. Messages sent in the old system do not exist in the new one, and vice versa. You must know which system you are sending messages to.
Channel
The new system has one channel: a REST API (JSON) with authentication via HelseID. In contrast to the old system, there is no use of the NHN Service Bus, no AppRec and no publication of Person objects on a topic. The clinical system fetches (polls) the status of the birth message from the API to get the child's NIN.
Overall flow
sequenceDiagram
participant EPJ as Clinical system (EPJ)
participant API as New birth message (REST API)
participant FREG as Population Register (Tax Administration)
Note over EPJ, API: Registration (synchronous)
EPJ->>+API: POST /v1/birth (HelseID)
API-->>-EPJ: 200 OK with messageId
Note over API, FREG: Forwarding (asynchronous)
API->>FREG: Register birth (foedsel_v1)
FREG-->>API: Decision + NIN (via feed)
Note over EPJ, API: NIN lookup (polling)
EPJ->>API: GET /v1/birth/{messageId}
API-->>EPJ: Status + child's NIN (when approved)
- Registration – The clinical system POSTs the birth. The API validates and stores the message and immediately returns a
messageId. The identity of the midwife or doctor (name, HPR number and organisation) is taken from the HelseID token and is not part of the request. - Forwarding to the Population Register – Background services send stored messages to the Population Register and read the responses back.
- Status – The clinical system polls the status of the message. When the Population Register has approved the message, the child's NIN is available via the status endpoint.
Status of a birth message
stateDiagram-v2
[*] --> Received
Received --> SentToTaxOffice: sent to the Population Register
SentToTaxOffice --> Approved: approved + NIN
SentToTaxOffice --> Denied
SentToTaxOffice --> Rejected
SentToTaxOffice --> Cancelled
SentToTaxOffice --> ManualReview
The status values (as returned in JSON) and the status endpoints are documented in Status.
Important differences from the old system
| Old system | New system | |
|---|---|---|
| Channel | NHN Service Bus (XML) and web portal | REST API (JSON) with HelseID |
| Receipt | AppRec (application receipt) on the Service Bus | HTTP response (status code and error message) |
| NIN | Person object published on the topic queue |
Polling of the status endpoint |
| Identification of the child | H-number (11 digits, encoded in the reference) | Free-text identifier (hospitalChildIdentificationNumber, max 200 characters), unique per organisation |
| Midwife/doctor | Sent in the message (Signaturinfo) |
Taken from the HelseID token |
| Institution | Institution number (OrgReg) + address | Institution name + municipality number |
| Correction | referanseTidligereMelding |
isCorrectedRequest + originalMessageId |
| Parents with NIN | Personal data (name, date of birth, NIN) sent in the message | Only the NIN is sent – name and date of birth are looked up in the Person Service |
| Child's date of birth | No lower limit (the date in the H-number must not be in the future) | Must be within the last year |
Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/v1/birth |
POST | Register a birth |
/v1/birth/{messageId} |
GET | Get the status of a message by message ID |
/v1/birth/get-by-hospital-child-identification-number |
POST | Get the status of messages by the hospital's identification number |