Changelog
All notable changes to the Nompd API will be documented in this file.
The format is based on Keep a Changelog.
[3.0.0] - 2026-04-30
Breaking Changes
- Renamed
Behandlingsgruppemodel toTreatmentGroup— endpoint, model, and MongoDB collection all renamed for consistency withReimbursementGroup.- Endpoint:
GET /api/v1/behandlingsgrupper→GET /api/v1/treatmentGroup - Mongo collection:
Behandlingsgrupper→TreatmentGroups - Model shape unchanged (same fields:
id,name,description,diseaseGroup,jurisdictions,validityPeriod,reviewDate,indications,treatmentAlternatives) - No backwards-compatible parallel endpoint — consumers must migrate.
- Endpoint:
Added
- Per-document version metadata in response wrapper —
VersionedItem<T>now exposesversion(the sync version when this item last changed) andlastChanged(ISO-8601 timestamp). Applies to bothtreatmentGroupandreimbursementGroupendpoints.
[2.0.0] - 2026-04-28
Breaking Changes
Replaced
Reimbursementmodel withReimbursementGroup— the endpoint, model shape, and MongoDB collection have all been renamed and restructured.- Endpoint:
GET /api/v1/reimbursements→GET /api/v1/reimbursementGroup - Mongo collection:
Reimbursements→ReimbursementGroups - Model is reduced to three fields:
id,legalBasis(CodeableConcept),indications(CodeableConcept[]) - The previous
medicinalReferencesarray is removed pending a redesign legalBasisnow correctly carries the hjemmel (e.g., H-resept §950) sourced from the upstreamreimbursementRegulationextension, rather than the first coding fromBasisindicationscarries the diagnoses (e.g., ICD-10 codes) sourced fromBasis.Coding, with one CodeableConcept per coding
Consumers using the old endpoint must migrate. There is no backwards-compatible parallel endpoint.
- Endpoint:
[1.1.0] - 2026-04-28
Added
Raw FHIR persistence — Upstream FHIR resources are now stored in MongoDB alongside the converted output, sharing the same version number per sync.
- New versioned collections:
PlanDefinitions,ActivityDefinitions,RegulatedAuthorizations - Each wrapped in
VersionedDocument<T>with the same upsert + soft-delete semantics as the output collections - Enables re-conversion if mapping logic changes, debugging via raw-vs-converted comparison, and full audit traceability
- New versioned collections:
Sync history — Every sync run writes one entry to the new
SyncHistorycollection with:Version,SyncedAt,DurationMs- Per-collection statistics (
AddedCount,UpdatedCount,UnchangedCount,DeletedCount) - Business keys of every added, updated, and deleted record (
AddedKeys,UpdatedKeys,DeletedKeys)
unchangedfield inSyncResult— ThePOST /api/internal/syncresponse now includes a count of records that were detected as unchanged.
Changed
Content-hash-based change detection —
VersionedDocument<T>has a newContentHashfield (SHA256 of BSON). Records only receive a newVersionif their hash actually changed (or their deletion state flipped). Previously every sync bumped the version on every record, which made?sinceVersion=Nreturn everything after each sync. Now diff queries return only the records that genuinely changed.- Migration impact: The first sync after deploy bumps the version on all existing records once (because they have no hash to compare against), then subsequent syncs only touch genuinely changed records.
Sync log line — Now includes
unchangedcount in the structured log message.
Internal
PlanDefinitionno longer has a[BsonId]attribute — it is now embedded insideVersionedDocument<PlanDefinition>, and the wrapper holds the Mongo document ID.UpsertCollection<T>inSyncServicenow returnsSyncCollectionStats(counts plus business keys) instead of a counts-only tuple.
[1.0.0] - 2026-04-13
Added
Behandlingsgrupper endpoint (
GET /api/v1/behandlingsgrupper)- Returns treatment groups with ranked treatment alternatives
- Includes jurisdictions, indications, validity periods, and medicine references
Reimbursements endpoint (
GET /api/v1/reimbursements)- Returns reimbursement authorizations with regulation basis and indication codes
- Includes medicine references (FEST and NOMPD)
Version-based diff support
- All endpoints accept
?sinceVersion=Nto return only changes since a given version - Responses include
currentVersionfor clients to track their sync state - Deleted items are included in diff responses with
isDeleted: true
- All endpoints accept
API key authentication
- All endpoints require
X-API-KEYheader - Keys are configured server-side and issued manually
- All endpoints require
Sync endpoint (
POST /api/internal/sync)- Triggers a full data sync from upstream FHIR APIs
- Intended to be called by a Kubernetes CronJob
- Returns sync statistics (added, updated, deleted, duration)