References/User & Skills: 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 12: | Line 12: | ||
A <code>User</code> is a Care account — authentication, profile, clinician credentials, and notification/MFA data. The Django model is the storage layer. The Pydantic resource specs in <code>care/emr/resources/user/</code> and <code>care/emr/resources/mfa/</code> are the API layer: they define enums, validation, the shape of the opaque <code>JSONField</code>s, and the separate request/response schemas you write to and read from. |
A <code>User</code> is a Care account — authentication, profile, clinician credentials, and notification/MFA data. The Django model is the storage layer. The Pydantic resource specs in <code>care/emr/resources/user/</code> and <code>care/emr/resources/mfa/</code> are the API layer: they define enums, validation, the shape of the opaque <code>JSONField</code>s, and the separate request/response schemas you write to and read from. |
||
'''Source:''' [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/users/models.py <code>care/users/models.py</code>], [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/facility/models/patient.py <code>care/facility/models/patient.py</code>], [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/user/spec.py <code>care/emr/resources/user/spec.py</code>], [<nowiki/>https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/mfa/spec.py <code>care/emr/resources/mfa/spec.py</code>] |
|||
== Models == |
== Models == |
||
| Line 397: | Line 396: | ||
* Write through <code>UserCreateSpec</code> / <code>UserUpdateSpec</code>; read through <code>UserSpec</code> (list), <code>UserRetrieveSpec</code> (detail), <code>CurrentUserRetrieveSpec</code> (self), and <code>PublicUserReadSpec</code> (public). Picture URLs, MFA status, roles, flags, and nested org/creator objects are all computed server-side. |
* Write through <code>UserCreateSpec</code> / <code>UserUpdateSpec</code>; read through <code>UserSpec</code> (list), <code>UserRetrieveSpec</code> (detail), <code>CurrentUserRetrieveSpec</code> (self), and <code>PublicUserReadSpec</code> (public). Picture URLs, MFA status, roles, flags, and nested org/creator objects are all computed server-side. |
||
{{SourceCode |
|||
|model=care/users/models.py |
|||
|extra1_label=patient.py |
|||
|extra1_path=care/facility/models/patient.py |
|||
|spec=care/emr/resources/user/spec.py |
|||
|extra2_label=spec.py |
|||
|extra2_path=care/emr/resources/mfa/spec.py |
|||
}} |
|||
{{Navbox access governance}} |
{{Navbox access governance}} |
||