Secondary Use FHIR Server Implementation Guide
0.1.0 - ci-build

Publish Box goes here

FHIR Resources

FHIR Resources

Current Resource Roles

The project uses FHIR R4 resources for a patient-centered secondary-use dataset.

Resource Role in this project
Patient cohort anchor and subject identity before adapter privacy transforms
Condition IBD diagnosis and optional comorbidity/problem records
Observation functional status, fecal calprotectin, and laboratory measurements
MedicationRequest medication agreement-style prescribing intent
MedicationStatement medication use, including IBD and non-IBD medications
Procedure colonoscopy, ileocolonoscopy, biopsy, MRI enterography-like activity
AllergyIntolerance allergy records for a subset of patients
Provenance dataset-level metadata with patient targets
Encounter supported by search/date/privacy helper code but not part of the current default generated export

Patient As The Cohort Anchor

Most clinical resources point to the patient with subject.reference = Patient/{id}.

AllergyIntolerance uses patient.reference.

Provenance uses target references and is trimmed during adapter export so only targets for the selected cohort remain.

The adapter depends on those references to resolve cohorts and rewrite patient identifiers.

Search Parameters

The mock server supports a compact search subset:

Parameter Applies to
code coded clinical resources
subject subject-based clinical resources
patient patient-reference resources such as AllergyIntolerance
gender Patient
birthdate, birthdate-ge, birthdate-le Patient.birthDate
date, date-ge, date-le primary clinical dates
_summary=count count-only search bundle

This is a prototype search surface. It does not implement the full FHIR search grammar.

CapabilityStatement

Both services expose:

GET /fhir/metadata

The runtime capability statement currently advertises:

  • status = draft
  • kind = instance
  • fhirVersion = 4.0.1
  • JSON, application/fhir+json, and application/fhir+ndjson
  • system-level export operation

The IG includes fuller narrative capability statements for publication, but the local runtime capability remains intentionally compact.

OperationOutcome

Errors are returned as FHIR OperationOutcome resources where the route has a FHIR response body.

Examples:

  • unknown resource read
  • unknown Bulk job
  • invalid adapter privacy mode

The current helper uses error severity and diagnostic text. It is enough for prototype feedback, not a complete production error taxonomy.