Chapter 08 · Profiling & Validation · Beat 1 — The contract
The server is standing. Now — how do we say what counts as valid?
Resources flow in and out, but nothing yet enforces that in OUR system a Patient must carry an identifier, or an Observation must use a LOINC code. That is profiling. A profile constrains a base resource into a contract — and the validator is where the contract bites.
Three goals for this chapter
Constrain — a base resource with a StructureDefinition
Slice + must-support — split repeats, declare capability
Validate — a real instance against a profile in HAPI
And the hook
A profile is a contract you can enforce at write time — you will watch the validator reject a non-conformant resource