View table: ModelField
More languages
More actions
Table structure:
- Model - String
- Section - String
- Field - String
- FieldType - String
- Notes - Text
This table has 829 rows altogether.
This table is defined by the template Field.
| Page | Model | Section | Field | FieldType | Notes |
|---|---|---|---|---|---|
| References/Account (edit) | Account | Balances & totals | cached_items | JSONField (default {}) | Denormalized snapshot of the account's charge items, serialized as a <code>list</code> on retrieve. Not populated — the sync logic is commented out |
| References/Account (edit) | Account | Balances & totals | calculated_at | DateTimeField (nullable) | When the balances were last computed; set to <code>care_now()</code> on each sync |
| References/Account (edit) | Account | Balances & totals | total_balance | DecimalField | <code>total_gross − total_paid</code> |
| References/Account (edit) | Account | Balances & totals | total_billable_charge_items | DecimalField | Sum of <code>total_price</code> over charge items in <code>billable</code> status |
| References/Account (edit) | Account | Balances & totals | total_gross | DecimalField | Sum of <code>total_price</code> over charge items in <code>paid</code> or <code>billed</code> status |
| References/Account (edit) | Account | Balances & totals | total_net | DecimalField | Net total before adjustments. Not populated — the <code>sync_account_items</code> logic is commented out, so it holds the default <code>0</code> |
| References/Account (edit) | Account | Balances & totals | total_paid | DecimalField | Sum of <code>active</code>+<code>complete</code> payment reconciliations, minus credit-note reconciliations |
| References/Account (edit) | Account | Identity & scope | description | TextField | no |
| References/Account (edit) | Account | Identity & scope | facility | FK → facility.Facility (PROTECT) | yes |
| References/Account (edit) | Account | Identity & scope | name | CharField(255) | yes |
| References/Account (edit) | Account | Identity & scope | patient | FK → emr.Patient (PROTECT) | yes |
| References/Account (edit) | Account | Identity & scope | primary_encounter | FK → emr.Encounter (SET_NULL, nullable) | no |
| References/Account (edit) | Account | Status | billing_status | CharField(255) | yes |
| References/Account (edit) | Account | Status | service_period | JSONField (default {}) | yes (on spec) |
| References/Account (edit) | Account | Status | status | CharField(255) | yes |
| References/Account (edit) | Account | Tags & extensions | extensions | JSONField (default {}) | Open bag for deployment-specific metadata. <code>ExtensionValidator</code> checks it against <code>ExtensionResource.account</code>; surfaced only on the retrieve spec |
| References/Account (edit) | Account | Tags & extensions | tags | ArrayField[int] (default []) | Tag IDs applied to the account; rendered through <code>SingleFacilityTagManager</code> on read |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Clinical classification | allergy_intolerance_type | CharField(20), default "allergy" | <code>AllergyIntoleranceTypeOptions</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Clinical classification | category | CharField(100), null | <code>CategoryChoices</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Clinical classification | clinical_status | CharField(100), null | <code>ClinicalStatusChoices</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Clinical classification | criticality | CharField(100), null | <code>CriticalityChoices</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Clinical classification | verification_status | CharField(100), null | <code>VerificationStatusChoices</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Context & notes | copied_from | BigIntegerField, null (default=None) | not exposed |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Context & notes | encounter | FK → Encounter (CASCADE) | <code>UUID4</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Context & notes | note | TextField, null | <code>str |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Context & notes | patient | FK → Patient (CASCADE) | excluded from specs |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Substance & coding | code | JSONField (default=dict, not null/blank) | <code>Coding</code> bound to value set <code>system-allergy-code</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Timing | last_occurrence | DateTimeField, null | <code>datetime |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Timing | onset | JSONField (default=dict) | <code>AllergyIntoleranceOnSetSpec</code> |
| References/Allergy Intolerance (edit) | AllergyIntolerance | Timing | recorded_date | DateTimeField, null | <code>datetime |
| References/Base models & conventions (edit) | BaseModels&Conventions | BaseFlag | flag | CharField(max_length=1024) | Flag name, validated against <code>FlagRegistry</code> for the subclass's <code>flag_type</code> |
| References/Base models & conventions (edit) | BaseModels&Conventions | BaseModel fields | created_date | DateTimeField | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | BaseModel fields | deleted | BooleanField | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | BaseModel fields | external_id | UUIDField | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | BaseModel fields | modified_date | DateTimeField | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | CodeableConcept | coding | list[Coding] | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | CodeableConcept | id | str | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | CodeableConcept | text | str | '''yes''' (field present) |
| References/Base models & conventions (edit) | BaseModels&Conventions | Coding | code | str | '''yes''' |
| References/Base models & conventions (edit) | BaseModels&Conventions | Coding | display | str | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | Coding | system | str | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | Coding | version | str | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | ContactPoint | system | ContactPointSystemChoices | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | ContactPoint | use | ContactPointUseChoices | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | ContactPoint | value | str | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | EMRBaseModel fields | created_by | FK → users.User | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | EMRBaseModel fields | history | JSONField | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | EMRBaseModel fields | meta | JSONField | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | EMRBaseModel fields | updated_by | FK → users.User | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | EvaluatorConditionSpec | metric | str | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | EvaluatorConditionSpec | operation | str | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | EvaluatorConditionSpec | value | dict | yes |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponent and pricing types | amount | Decimal | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponent and pricing types | code | Coding | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponent and pricing types | conditions | list[EvaluatorConditionSpec] | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponent and pricing types | factor | Decimal | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponent and pricing types | global_component | bool | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponent and pricing types | monetary_component_type | MonetaryComponentType | '''yes''' |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponent and pricing types | tax_included_amount | Decimal | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponentType values | applicability_order | DiscountApplicability | enum below |
| References/Base models & conventions (edit) | BaseModels&Conventions | MonetaryComponentType values | max_applicable | int | <code>ge=0</code> |
| References/Base models & conventions (edit) | BaseModels&Conventions | Quantity | code | Coding | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | Quantity | meta | dict | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | Quantity | unit | Coding | no |
| References/Base models & conventions (edit) | BaseModels&Conventions | Quantity | value | Decimal | no |
| References/Booking (edit) | Booking | TokenBooking fields | associated_encounter | FK → emr.Encounter (PROTECT) | Encounter linked to the appointment; nullable, defaults to <code>None</code>. Surfaced only by <code>TokenBookingRetrieveSpec</code> |
| References/Booking (edit) | Booking | TokenBooking fields | booked_by | FK → User (CASCADE) | User who created the booking; nullable for self-service or system-created bookings |
| References/Booking (edit) | Booking | TokenBooking fields | booked_on | DateTimeField | <code>auto_now_add</code> — stamped once at creation, never accepted from clients |
| References/Booking (edit) | Booking | TokenBooking fields | charge_item | FK → emr.ChargeItem (CASCADE) | Billing charge item for the appointment; nullable. Auto-created on booking when the schedule has a <code>charge_item_definition</code> |
| References/Booking (edit) | Booking | TokenBooking fields | note | TextField | Free-text note; nullable in storage but required (<code>str</code>) on write |
| References/Booking (edit) | Booking | TokenBooking fields | patient | FK → emr.Patient (CASCADE) | The booked patient; required |
| References/Booking (edit) | Booking | TokenBooking fields | tags | ArrayField[int] | Tag IDs, default empty list. Managed via <code>SingleFacilityTagManager</code>; reads return rendered tag objects, not raw IDs |
| References/Booking (edit) | Booking | TokenBooking fields | token | FK → emr.Token (PROTECT) | Queue token issued for this booking; nullable, defaults to <code>None</code>, <code>related_name="token_booking"</code>. Created by the <code>generate_token</code> action |
| References/Booking (edit) | Booking | TokenBooking fields | token_slot | FK → TokenSlot (PROTECT) | The slot this appointment occupies; required. PROTECT prevents deleting a slot that has bookings |
| References/Booking (edit) | Booking | TokenSlot | allocated | IntegerField | Count of bookings currently allocated to the slot, used to enforce capacity. Defaults to <code>0</code>. Platform-maintained — never written by clients |
| References/Booking (edit) | Booking | TokenSlot | availability | FK → Availability (CASCADE) | The availability rule that generated this slot; nullable |
| References/Booking (edit) | Booking | TokenSlot | end_datetime | DateTimeField | Slot end; required, tz-aware |
| References/Booking (edit) | Booking | TokenSlot | resource | FK → SchedulableResource (CASCADE) | The schedulable resource — practitioner, location, or healthcare service — the slot belongs to; required |
| References/Booking (edit) | Booking | TokenSlot | start_datetime | DateTimeField | Slot start; required, tz-aware |
| References/Charge Item (edit) | ChargeItem | Context & relationships | account | FK → emr.Account (CASCADE) | The account this charge lands on. Falls back to the patient's default account when omitted |
| References/Charge Item (edit) | ChargeItem | Context & relationships | charge_item_definition | FK → emr.ChargeItemDefinition (CASCADE) | Nullable; the template the charge was applied from. Not writable via create/update — set only by <code>apply_charge_item_defs</code> |
| References/Charge Item (edit) | ChargeItem | Context & relationships | encounter | FK → emr.Encounter (CASCADE) | Nullable; the encounter the charge relates to |
| References/Charge Item (edit) | ChargeItem | Context & relationships | facility | FK → facility.Facility (PROTECT) | Set server-side from the URL; a body value is ignored |
| References/Charge Item (edit) | ChargeItem | Context & relationships | patient | FK → emr.Patient (CASCADE) | When you supply an <code>encounter</code>, the patient is taken from it rather than the request |
| References/Charge Item (edit) | ChargeItem | Description & status | description | TextField | Nullable; longer description |
| References/Charge Item (edit) | ChargeItem | Description & status | note | TextField | Nullable; free-text (markdown) comments |
| References/Charge Item (edit) | ChargeItem | Description & status | title | CharField(255) | Required; display title for the charge |
| References/Charge Item (edit) | ChargeItem | Invoicing & tags | paid_invoice | FK → emr.Invoice (CASCADE) | Nullable (default <code>None</code>); denormalized link to the settling invoice. Platform-maintained; cleared on cancel |
| References/Charge Item (edit) | ChargeItem | Invoicing & tags | paid_on | DateTimeField | Nullable (default <code>None</code>); when the charge was paid. Platform-maintained; cleared on cancel |
| References/Charge Item (edit) | ChargeItem | Invoicing & tags | tags | ArrayField[int] | Tag IDs, default <code>[]</code>. Managed through the tag mixin (<code>SingleFacilityTagManager</code>), serialized as objects on read |
| References/Charge Item (edit) | ChargeItem | Pricing | discount_configuration | JSONField | Nullable (default <code>None</code>); <code>DiscountConfiguration { max_applicable: int (≥0), applicability_order: total_asc |
| References/Charge Item (edit) | ChargeItem | Pricing | override_reason | JSONField | Nullable; <code>ChargeItemOverrideReason { text: str, code?: Coding }</code> explaining a list-price/factor override. No bound value set |
| References/Charge Item (edit) | ChargeItem | Pricing | quantity | DecimalField(20, 6) | Required on write; the quantity serviced. Multiplies the base/per-unit components during cost sync |
| References/Charge Item (edit) | ChargeItem | Pricing | total_price | DecimalField(20, 6) | Nullable; server-computed total. Must be ≥ 0 unless the charge is a reversal |
| References/Charge Item (edit) | ChargeItem | Pricing | total_price_components | JSONField | Nullable; server-computed list of <code>MonetaryComponent</code> (as dicts) — the resolved breakdown after base × quantity, surcharges, discounts, and taxes. Not client-writable |
| References/Charge Item (edit) | ChargeItem | Service source | performer_actor | FK → users.User (CASCADE) | Nullable (default <code>None</code>); the user who performed the service. Must belong to the facility's organization |
| References/Charge Item (edit) | ChargeItem | Service source | service_resource_id | CharField(255) | Nullable (default <code>None</code>); external id of the originating resource. Required once <code>service_resource</code> is set |
| References/Charge Item Definition (edit) | ChargeItemDefinition | Descriptive | description | TextField | no |
| References/Charge Item Definition (edit) | ChargeItemDefinition | Descriptive | purpose | TextField | no |
| References/Charge Item Definition (edit) | ChargeItemDefinition | Identity & versioning | derived_from_uri | TextField | no |