Projo FHIR Documentation
0.1.0 - ci-build Switzerland flag

Projo FHIR Documentation - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Runbooks

Runbooks

Add a new customer Organization

  1. Purchase + register phone number in Meta Business Suite; verify via SMS/voice OTP
  2. Register via Cloud API: POST /{PHONE_NUMBER_ID}/register with pin
  3. Create FHIR Organization with telecom (phone E.164), partOf root org, optional plan-slot extensions
  4. Activation is self-configuring on first outbound + first inbound
  5. Verify: Patient creation + outbound sends from correct number + cached wa-phone-number-id

Migrate plan-slots

migrate:plan-slots script:

  • Phase 1: seeds plan-slot extensions (legacy default-plan preserved)
  • Phase 2: removes legacy default-plan via --remove-legacy-default-plan
  • Per-org JSON audit line: {id, action, slots, removesLegacy, reason?, before, after}
  • Idempotent; refuses to drop legacy if no onboarding slot would remain

Renew CarePlan due-event subscription

Daily 2 AM via carePlanMaintenance. Manual renewal:

curl -X POST "${FIRE_ARROW_URL}/fhir/CarePlan/<ID>/$renew-due-events?end=${END_DATE}" \
  -H "Authorization: Bearer ${TOKEN}"

Register WhatsApp number (recovery)

  • Verification ≠ Registration (separate Meta steps)
  • status: PENDING vs CONNECTED
  • Lost PIN recovery: /request_code with code_method: VOICE (3/day budget); /verify_code; new /register

Deploy knowledge artifacts

  1. Author/validate JSON in infrastructure/fhir-artifacts/
  2. Dry-run: ./deploy-artifacts.sh (default dry-run)
  3. Apply: ./deploy-artifacts.sh --apply (dev first, then prod)
  4. Activate routing: seed:routing-slot --org=<id> --router=<canonical>|<version> --apply
  5. Rollback: repoint slot or remove

Measure FHIR capacity

npm run measure-fhir-capacity -- --apply

Re-measure whenever App Service plan, Postgres SKU, or HAPI maximum-pool-size changes. Patches host.json + azure-{dev,prod}.tfvars.json; never runs terraform apply.

Manage poison queues

./infrastructure/scripts/manage-poison-queues.sh

Inspect messages, fix root cause, replay to main queue.