Validation

In addition to validating the format and structure of the request properties (e.g., data types, required fields, and value constraints), we also perform data validation to ensure the content itself is accurate, consistent, and aligned with business rules. This includes checks such as verifying that referenced entities exist, values fall within acceptable ranges, and relationships between fields are logically valid.

We validate the follwing:

  • Vaccine - vaccine data is validated against {BASE_URL}/vaccines
    • The provided vaccine product (nplId or name) must exist in our list. Name may only be used if the vaccine product lacks nplId.
    • Batch number (if provided) must belong to the provided vaccine product
  • Patient
    • For identifiers of type personal number and coordination number, the patient must be registered at the Swedish Tax Agency.
  • Vaccination date
    • Must not be a future date.
  • Duplicate control when registering new vaccination(s)
    • The combination of health caregiver org. number and indentifier (Immunization.identifier) must not already exist.
    • The combination: patient, vaccination date, and vaccine type (via nplId) must not already exist.