Skip to main content

Follow one patient across services

Start at the neighbourhood map. Riverside Practice opens GP Records for primary care. Northbank General opens Hospital EPR for secondary care. Use the same team key in both.

Community and pharmacy have their own workspaces and scoped APIs. Diagnostics and referrals expose supporting APIs. Query those services when you need to distinguish a completed handover from a request.

Discharge to primary care​

Use SIM-000001. Inspect the hospital document in Hospital EPR and the follow-up task in GP Records. Check which records each service can see. Use share_record when the receiving service needs a document.

Order monitoring through /api/sites/gp/actions with order_test. Advance the world by 121 minutes through /api/clock, then read /api/sites/diagnostics/view?patient=SIM-000001 and confirm the test is available. A pathology outage can hold a result in diagnostics until the organiser restores the feed.

The original document, receiving service's visible copy and final test status can be inspected separately.

Medicines and support at home​

Draft a prescription with draft_prescription from GP or hospital. Its owner is pharmacy. GP can retrieve its prescriptions at /api/sites/gp/prescriptions and perform review then accept through /api/sites/gp/actions for prescriptions originally drafted by GP. Send the latest expectedVersion with each GP change. Read the product catalogue at /api/sites/pharmacy/pharmacy-workspace. Use link_prescription_stock to choose a matching productId and quantity in units. If the prescription has not been approved, use /api/sites/pharmacy/actions to review then accept it. For an approved prescription, continue with dispense then collect through that endpoint. Send its current expectedVersion with each action. Acceptance changes it to approved; dispensing deducts the linked quantity from stock. Use a team key with pharmacy scope.

For SIM-000006, inspect the support plan through /api/sites/community/view?patient=SIM-000006. Create a schedule_visit action from GP or hospital and advance the clock by 91 minutes. Confirm the visit completed in the community projection. Exhausted community capacity rejects new bookings with HTTP 409.

Show medicine status and visit completion separately. Collection does not establish adherence, and a simulated visit does not establish a real clinical outcome.

Resolve a rejected referral​

Use SIM-000002. Read the referral and diagnostics projections. Retrieve the additional letter through the legacy browser. Share the evidence needed by the receiving service, then progress the original referral through /api/sites/referrals/actions.

The original referral identifier stays the same as its status changes.

Test an identity integration​

Use the CIS2 emulator for a separate staff sign-in exercise. Its identity tokens and a team's API key have different purposes. See the API reference for the implemented protocol and operator controls.

What comes next​

The EPRs, pharmacy dispensing bench and community visit board demonstrate handovers and support after discharge. The current simulation has finite visit capacity and a prescription lifecycle, but does not model travel, home access, medication adherence or clinical outcomes.

Keep the seed and intervention sequence fixed when comparing runs. Present initial records, actions, rejected requests and final states. Test the expected number of concurrent team worlds before the event.

Try a complete journey in ten minutes​

  1. Create a team from the map. In GP Records, choose Amira Khan, SIM-000001, and send a referral to the hospital.
  2. Open Hospital EPR from the map. Select Amira and find your referral in Handover.
  3. Open High Street Pharmacy. Select the discharge prescription, link its matching catalogue item and quantity, dispense it, and confirm collection. A newly drafted prescription must first be reviewed and approved.
  4. Open Neighbourhood Care, select Amira and schedule a home visit. Open Simulation controls and advance 121 minutes. The visit changes to completed after its 90-minute delay.
  5. Open At home from the map and choose a resident by name or patient ID. Connect a simulated watch if they do not have one. The first activity reading is due after 10 simulation minutes. Use +15 minutes to observe it; subsequent readings arrive hourly. Change resident to explore another person's records.

These steps introduce the available controls. Choose your own problem from the ten-year plan when deciding what to build.

The home readings are authored synthetic examples. They do not provide health assessments. A new team includes the wearable history and scope; older teams keep their original data and permissions. If your old key lacks wearable access, create a new team to try the whole journey.