PlaygroundHealth care

Cedar Ridge Clinic

Fictional companyHealth care

A multi-provider outpatient clinic running intake through discharge under consent, privacy, and escalation rules.

Modeled on

  • HL7 FHIR R4: Resource names and field names — Patient, Encounter, ServiceRequest, CarePlan, Consent.
  • HL7 v3 ActCode: Encounter classes: AMB, EMER, IMP, VR.
  • LOINC: Observation codes.
  • ICD-10-CM: Condition codes.

The genome map

Roles in their reporting line, the process step by step with the role on each step, the rules on the steps they govern, and the resources the work acts on. Select a role to see what it reaches.

Roles Select a role to see its reach.

Patient Care Pathway Operated by Medical Director

Arrival through discharge, with consent verified before any chart is opened.

  1. 1 Register patient Front Desk CoordinatorPatient.Register
    • Registration is front desk
  2. 2 Verify consent Front Desk CoordinatorConsent.Verify
  3. 3 Triage Triage NurseEncounter.Triage
    • Triage belongs to nursing
  4. 4 Assess PhysicianEncounter.Assess
    • Only clinicians assess
  5. 5 Submit requests PhysicianServiceRequest.Submit
    • Prescribing is licensed
  6. 6 Update care plan Care CoordinatorCarePlan.Update
  7. 7 Discharge PhysicianEncounter.Discharge

Resources

  • Patient
  • Encounter
  • Care Plan
  • Service Request
  • Consent
  • Observation
  • Condition

Rules on no step They govern operations outside the process.

  • Consent precedes chart access

Three questions this genome answers

Each answer comes from the compiled genome alone. Pick another subject and the answer changes in place.

Medical Director, Physician may perform Encounter.Assess. The rule: Only clinicians assess.

These steps wait for Physician:

  • Assess Patient Care Pathway
  • Submit requests Patient Care Pathway
  • Discharge Patient Care Pathway

Medical Director, Physician, Triage Nurse act on Encounter, by a process step or under an access rule.

Every artifact from one genome

The same derivations and renderers the Playground runs, here for Cedar Ridge Clinic at build time. Open it in the Playground to pick your own set.

Operations

How the work actually runs — who owns what, in what order, under which rules.

Process flow

The end-to-end sequence, each step with its owner.

Arrival through discharge, with consent verified before any chart is opened.

  1. 1
    Register patient
    Confirm identity, demographics, and coverage; open the encounter.
    Front Desk CoordinatorPatient.Register
  2. 2
    Verify consent
    Confirm a current consent covers treatment before the chart is opened.
    Front Desk CoordinatorConsent.Verify
  3. 3
    Triage
    Take vitals, set acuity, and route — anything emergent leaves the pathway here.
    Triage NurseEncounter.Triage
  4. 4
    Assess
    Examine, form the working diagnosis, and record the assessment.
    PhysicianEncounter.Assess
  5. 5
    Submit requests
    Order labs, imaging, medication, or a referral against the encounter.
    PhysicianServiceRequest.Submit
  6. 6
    Update care plan
    Revise problems, goals, and the review date; schedule the follow-up.
    Care CoordinatorCarePlan.Update
  7. 7
    Discharge
    Give discharge instructions, set disposition, and close the encounter.
    PhysicianEncounter.Discharge

Owned end to end by Medical Director.

SOP / runbook

The same process as a numbered operating procedure.

PurposeArrival through discharge, with consent verified before any chart is opened.
OwnerMedical Director
TriggerA patient arrives or checks in.
  1. 1. Register patient
    Confirm identity, demographics, and coverage; open the encounter.
    Performed by Front Desk Coordinator
  2. 2. Verify consent
    Confirm a current consent covers treatment before the chart is opened.
    Performed by Front Desk Coordinator
  3. 3. Triage
    Take vitals, set acuity, and route — anything emergent leaves the pathway here.
    Performed by Triage Nurse
  4. 4. Assess
    Examine, form the working diagnosis, and record the assessment.
    Performed by Physician
  5. 5. Submit requests
    Order labs, imaging, medication, or a referral against the encounter.
    Performed by Physician
  6. 6. Update care plan
    Revise problems, goals, and the review date; schedule the follow-up.
    Performed by Care Coordinator
  7. 7. Discharge
    Give discharge instructions, set disposition, and close the encounter.
    Performed by Physician

Key positions

The roles this operation needs and who reports to whom.

Care Team

  • Medical Director
    Clinically accountable for the practice and its protocols.
    • Physician
      Assesses, diagnoses, and orders.
      AssessSubmit requestsDischarge
      • Care Coordinator
        Owns the care plan and the follow-up loop.
        Update care plan
    • Triage Nurse
      Sets acuity and routes patients on arrival.
      Triage
    • Front Desk Coordinator
      Registers patients and verifies consent and coverage.
      Register patientVerify consent

Each chip is a step of the process that role owns.

RACI matrix

Every step against every role — responsible, accountable, consulted.

StepMedical DirectorPhysicianTriage NurseCare CoordinatorFront Desk Coordinator
Register patientAR
Verify consentAR
TriageACR
AssessAR
Submit requestsARC
Update care planAR
DischargeARC

R responsible · A accountable · C consulted — derived from step owners, the process operator, and access rules.

Policies & rules

The constraints that govern each operation, stated as rules.

  • Consent precedes chart access condition

    A chart does not open until a current consent covering treatment is on file.

    Patient.Read
  • Only clinicians assess access

    Assessment is a clinical act. Administrative staff never perform one.

    Encounter.Assess PhysicianMedical Director
  • Prescribing is licensed access

    Orders are placed by the licensed provider who will answer for them.

    ServiceRequest.Submit PhysicianMedical Director
  • Triage belongs to nursing access

    Acuity is set by triage nursing, so the standard is applied the same way every time.

    Encounter.Triage Triage NurseMedical Director
  • Registration is front desk access

    Demographics and coverage are captured once, by the desk that owns them.

    Patient.Register Front Desk CoordinatorMedical Director

Product

What gets built on top of it — the data, the screens, the API.

Data model

The entities, their fields, and how they relate.

Patient RegisterRead

A person under the clinic’s care, with their demographics and consent state.

  • identifier string required
  • birthDate date required
  • active boolean required
  • generalPractitioner string
Encounter TriageAssessDischarge

One visit — the unit everything clinical hangs off.

  • class enum required AMB · EMER · IMP · VR
  • period datetime required
  • priority enum required routine · urgent · asap · stat
  • status enum planned · in-progress · finished · cancelled
Care Plan Update

FHIR CarePlan — addresses a Condition, carries goals and the review date.

  • addresses string required
  • goal text
  • status enum required draft · active · on-hold · completed · revoked
  • periodEnd date
Service Request SubmitList

FHIR ServiceRequest — a lab, imaging, medication, or referral order on an encounter.

  • category enum required laboratory · imaging · medication · referral
  • code string required
  • intent enum required proposal · plan · order
  • status enum required draft · active · on-hold · completed · revoked
Consent Verify

FHIR Consent — what the patient permitted, for which purpose, and until when.

  • scope enum required patient-privacy · treatment · research
  • status enum required draft · active · inactive
  • dateTime date required
  • provisionPeriodEnd date
Observation Record

FHIR Observation — a measurement or finding, LOINC-coded.

  • code string required
  • valueQuantity number required
  • unit string
  • effectiveDateTime datetime required
Condition Diagnose

FHIR Condition — a problem on the patient’s list, ICD-10-CM coded.

  • code string required
  • clinicalStatus enum required active · recurrence · remission · resolved
  • onsetDateTime date

Screen map

Every route and the page it resolves to.

Shell: ClinicalShell

/board
Encounter Board 🔒
Encounter board.
Encounter tablesummary
/patients/:id
Patient Chart 🔒
Patient chart.
Patient formactions
/service-requests
Service Request Queue 🔒
Service request queue.
Service Request table
/care-plans
Care Plan Review 🔒
Care plan review.
Care Plan actions

Example UI

A working admin table and detail form, built from the fields.

Encounter Board TriageClose
PatientVisitAcuityArrivedProvider
M. Alvarezurgentelevated2026-08-18 08:14Dr. Reyes
J. Whitfieldfollow-uproutine2026-08-18 08:40Dr. Osei
S. Nakamuranewroutine2026-08-18 09:05Dr. Reyes
D. Kowalskitelehealthroutine2026-08-18 09:30Dr. Osei
Encounter detail

API surface

The endpoints, grouped by namespace, with their operations.

Clinical/api/clinical

Encounter, chart, order, and consent operations.

  • GET /api/clinical/encounters Encounter.List Today’s board.
  • POST /api/clinical/encounters/{id}/triage Encounter.Triage Set acuity and route.
  • POST /api/clinical/encounters/{id}/close Encounter.Discharge Discharge and close.
  • GET /api/clinical/patients/{id} Patient.Read Open a chart.
  • POST /api/clinical/patients Patient.Register Register a patient.
  • GET /api/clinical/encounters/{id}/service-requests ServiceRequest.List Requests on an encounter.
  • POST /api/clinical/service-requests ServiceRequest.Submit Submit a clinical request.

Technology

Where it runs and who can reach it.

Architecture diagram

The cells this runs on and what talks to what.

ClinicalWeb
nextjs 15
The board and the chart.
CedarRidgeClinic.Product.Web
EncounterService
nestjs 10
Encounter lifecycle and triage.
CedarRidgeClinic.Product.Api
ServiceRequestRouter
nestjs 10
Requests out to lab, imaging, and pharmacy.
CedarRidgeClinic.Product.Api
ConsentGate
express 4
Enforces the consent rule ahead of every chart read.
CedarRidgeClinic.Operational
ClinicalDb
postgres 16
Patients, encounters, orders, care plans.
CedarRidgeClinic.Product.Core
  • ClinicalWeb → EncounterService board
  • ClinicalWeb → ConsentGate chart access
  • ConsentGate → ClinicalDb consent lookup
  • EncounterService → ServiceRequestRouter encounter.assessed
  • EncounterService → ClinicalDb depends-on
  • ServiceRequestRouter → ClinicalDb depends-on

Environment topology

Dev, staging, and production, with the providers behind each.

dev
Synthetic patients only. No PHI, ever.
Providers
AWScloudAuroraPostgresdatabase
Cells
none
staging
De-identified data for release rehearsal.
Providers
AWScloudAuroraPostgresdatabaseRedoxmessaging
Cells
none
prod
Live clinical operations.
Providers
AWScloudAuroraPostgresdatabaseRedoxmessagingEpicother
Cells
ClinicalWebEncounterServiceServiceRequestRouterConsentGateClinicalDb

Access-control matrix

Which role may perform which operation, derived not declared.

OperationMedical DirectorPhysicianTriage NurseCare CoordinatorFront Desk Coordinator
Patient.RegisterRegistration is front desk✓✓
Encounter.TriageTriage belongs to nursing✓✓
Encounter.AssessOnly clinicians assess✓✓
ServiceRequest.SubmitPrescribing is licensed✓✓
No access rule governs
Patient.ReadConsent.VerifyEncounter.DischargeEncounter.ListServiceRequest.ListCarePlan.Update

Derived, not declared — this is the list an audit asks about.

Make yours

Start from Cedar Ridge Clinic and change what differs, or pick another company as your template. Three ways in:

  1. 1. Download the template

    The compiled genome as JSON: every role, step, rule, resource, screen and system on this page.

    Download Cedar Ridge Clinic as JSON
  2. 2. Start an agent from it

    Paste this into an agent that has the DNA MCP server connected. It drafts your model in the conversation and saves only when you ask.

    Use the DNA MCP server (https://agents.dna.codes) to help me model how my company works.
    Start from the Cedar Ridge Clinic genome at https://dna.codes/genome/healthcare.json. It is an example company, not mine.
    Read its roles, process steps, rules and resources, then ask me how my company differs.
    Draft my company's operating model in this conversation, as structure/v1 and behaviour/v1 documents, and use `validate` on each draft.
    Do not save anything: call `apply` only when I ask you to save.
  3. 3. Join the waitlist

    The hosted product runs your model for your team and your agents.

Which of these sounds like you? Pick as many as apply.

The most useful box on this page. Rough is fine, and “nowhere, honestly” is a real answer and a common one.

We reply by hand, usually within a day. No sequence, no drip, no spam.