Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

References/Activity Definition: Difference between revisions

From OHC Network Wiki
More languages
Content deleted Content added
Automated edit (via update-page on MediaWiki MCP Server)
Migrate to {{SourceCode}} template; remove hardcoded GitHub links (via update-page on MediaWiki MCP Server)
Line 10: Line 10:


An <code>ActivityDefinition</code> is a FHIR-aligned, facility-scoped template for a clinical activity. It stores the defaults needed to spin up a downstream resource — currently a [[References/Service Request]] — and you &quot;apply&quot; it against an encounter, which merges those defaults with the encounter context to produce the live resource.
An <code>ActivityDefinition</code> is a FHIR-aligned, facility-scoped template for a clinical activity. It stores the defaults needed to spin up a downstream resource — currently a [[References/Service Request]] — and you &quot;apply&quot; it against an encounter, which merges those defaults with the encounter context to produce the live resource.

'''Source:'''

* Model: [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/emr/models/activity_definition.py <code>care/emr/models/activity_definition.py</code>]
* Resource specs: [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/activity_definition/spec.py <code>spec.py</code>] · [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/activity_definition/valueset.py <code>valueset.py</code>] · [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/activity_definition/service_request.py <code>service_request.py</code>]


The Django model is just storage. Several fields are opaque <code>JSONField</code>s or integer <code>ArrayField</code>s whose real structure lives in the Pydantic resource specs — the API layer that defines the enums, JSON shapes, validation rules, and the split between read and write schemas. Neither layer is complete on its own; read them together.
The Django model is just storage. Several fields are opaque <code>JSONField</code>s or integer <code>ArrayField</code>s whose real structure lives in the Pydantic resource specs — the API layer that defines the enums, JSON shapes, validation rules, and the split between read and write schemas. Neither layer is complete on its own; read them together.
Line 292: Line 287:
* The requirement and linkage fields are plain integer ID arrays. Retrieve serialization resolves them to nested objects and skips any ID that no longer resolves, so a response can omit a requirement you stored.
* The requirement and linkage fields are plain integer ID arrays. Retrieve serialization resolves them to nested objects and skips any ID that no longer resolves, so a response can omit a requirement you stored.



{{SourceCode
|model=care/emr/models/activity_definition.py
|spec=care/emr/resources/activity_definition/spec.py
|valueset=care/emr/resources/activity_definition/valueset.py
|extra1_label=service_request.py
|extra1_path=care/emr/resources/activity_definition/service_request.py
}}
{{Navbox definitions}}
{{Navbox definitions}}


{{Related}}
{{Related}}
Wiki: ohcnwiki.tellmey.fyi