References/Facility Flag: Difference between revisions
From OHC Network Wiki
More languages
More actions
Content deleted Content added
Automated edit (via update-page on MediaWiki MCP Server) |
Migrate to {{SourceCode}} template |
||
| Line 11: | Line 11: | ||
<code>FacilityFlag</code> binds a registered flag name to a single <code>Facility</code> to gate server-side behaviour. It is not a FHIR resource and has no Pydantic spec — no endpoint, serializer, or <code>...CreateSpec</code>/<code>...ReadSpec</code> — so everything below comes from the Django storage model. Clients never write flags; they read them as a derived array on the Facility resource (see [[#resource-specs-api-schema|Resource specs]]). |
<code>FacilityFlag</code> binds a registered flag name to a single <code>Facility</code> to gate server-side behaviour. It is not a FHIR resource and has no Pydantic spec — no endpoint, serializer, or <code>...CreateSpec</code>/<code>...ReadSpec</code> — so everything below comes from the Django storage model. Clients never write flags; they read them as a derived array on the Facility resource (see [[#resource-specs-api-schema|Resource specs]]). |
||
'''Source:''' |
|||
* Model: [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/facility/models/facility_flag.py <code>care/facility/models/facility_flag.py</code>] |
|||
* Base/flag machinery: [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/utils/models/base.py <code>care/utils/models/base.py</code>] |
|||
* Flag registry & types: [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/utils/registries/feature_flag.py <code>care/utils/registries/feature_flag.py</code>] |
|||
* Surfaced via Facility spec: [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/facility/spec.py <code>care/emr/resources/facility/spec.py</code>] |
|||
== Models == |
== Models == |
||
| Line 218: | Line 212: | ||
* The <code>{facility, flag}</code> uniqueness holds only over non-deleted rows, so soft-deleted history is preserved and a flag can be removed then re-added. |
* The <code>{facility, flag}</code> uniqueness holds only over non-deleted rows, so soft-deleted history is preserved and a flag can be removed then re-added. |
||
{{SourceCode |
|||
|model=care/facility/models/facility_flag.py |
|||
|base=care/utils/models/base.py |
|||
|extra1_label=Flag registry & types |
|||
|extra1_path=care/utils/registries/feature_flag.py |
|||
|extra2_label=Surfaced via Facility spec |
|||
|extra2_path=care/emr/resources/facility/spec.py |
|||
}} |
|||
{{Navbox facility}} |
{{Navbox facility}} |
||