{
  "resourceType": "CodeSystem",
  "status": "draft",
  "content": "complete",
  "name": "NexusFilingStateCS",
  "id": "nexus-filing-state",
  "title": "Filing State Tag CodeSystem",
  "description": "Where an incoming record stands in being filed to a patient's chart, carried as a tag on the\nrecord's `meta.tag` where this is the tag's `system`. One state is defined: `awaiting-patient`, for\na record that has arrived but has not yet been matched to a patient. One code system serves every\nsource of unmatched records, whatever their resource type.\n\n**It is what makes a missing subject legitimate,** where a profile adopts it. A `DiagnosticReport`\nor `Observation` must carry a `subject` unless it carries `awaiting-patient`\n(`nexus-subject-unless-awaiting-patient`); so must a `DocumentReference` that is not a form template\n(`nexus-documentreference-subject-unless-template`). A record carrying `awaiting-patient` must not\ncarry a `subject` (`nexus-awaiting-patient-has-no-subject`).\n\n**Matching clears it.** Filing the record to a patient sets `subject` and removes the coding in the\nsame write.\n\n**Absence means filed,** where a profile's invariants say so. An untagged `DocumentReference` that is\nnot a form template has a subject. Do not infer the tag from a missing subject alone: a form\ntemplate has none either.\n\n**A workflow marker, not a status or a security label.** The resource's own status elements keep\ndescribing the record itself, and the tag grants or withholds no access.\n\n**At most one coding under this system.** Writers replace it rather than appending; a reader should\ntake the first and not reconcile two.",
  "url": "https://fhir.apps.health/CodeSystem/nexus-filing-state",
  "concept": [
    {
      "code": "awaiting-patient",
      "display": "Awaiting patient",
      "definition": "The record has arrived but has not been matched to a patient. It carries no subject and is on no patient's chart; it waits in the inbox until someone files it. Filing it sets the subject and removes this coding in the same write."
    }
  ],
  "experimental": false,
  "caseSensitive": true,
  "count": 1
}
