welkin.models ============= .. py:module:: welkin.models Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/welkin/models/assessment/index /autoapi/welkin/models/base/index /autoapi/welkin/models/calendar/index /autoapi/welkin/models/care_plan/index /autoapi/welkin/models/cdt/index /autoapi/welkin/models/chat/index /autoapi/welkin/models/document/index /autoapi/welkin/models/email/index /autoapi/welkin/models/encounter/index /autoapi/welkin/models/export/index /autoapi/welkin/models/formation/index /autoapi/welkin/models/patient/index /autoapi/welkin/models/program/index /autoapi/welkin/models/sms/index /autoapi/welkin/models/user/index Classes ------- .. autoapisummary:: welkin.models.Assessment welkin.models.AssessmentRecord welkin.models.AssessmentRecordAnswers welkin.models.AssessmentRecords welkin.models.Assessments welkin.models.CalendarEvent welkin.models.CalendarEvents welkin.models.Schedules welkin.models.WorkHours welkin.models.CarePlan welkin.models.CarePlanOverview welkin.models.CDT welkin.models.CDTs welkin.models.Chat welkin.models.Chats welkin.models.SearchChats welkin.models.DocumentSummaries welkin.models.DocumentSummary welkin.models.DocumentSummaryFile welkin.models.DocumentSummaryFiles welkin.models.Email welkin.models.Emails welkin.models.Encounter welkin.models.EncounterDisposition welkin.models.Encounters welkin.models.CDTRecordsExport welkin.models.Formation welkin.models.Patient welkin.models.Patients welkin.models.PatientProgram welkin.models.PatientPrograms welkin.models.ProgramPhase welkin.models.ProgramPhases welkin.models.SMS welkin.models.SMSes welkin.models.User welkin.models.Users Package Contents ---------------- .. py:class:: Assessment Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: create(patient_id: str, encounter_id: str) .. py:method:: get(patient_id: str, encounter_id: str) Return the value for key if key is in the dictionary, else default. .. py:method:: update(patient_id: str, encounter_id: str, **kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete(patient_id: str, encounter_id: str) .. py:class:: AssessmentRecord Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: subresources .. py:method:: create(patient_id: str) .. py:method:: get(patient_id: str) Return the value for key if key is in the dictionary, else default. .. py:method:: update(patient_id: str) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete(patient_id: str) .. py:class:: AssessmentRecordAnswers Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: update(patient_id: str, assessment_record_id: str) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:class:: AssessmentRecords Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, **kwargs) .. py:class:: Assessments Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, encounter_id: str, *args, **kwargs) .. py:class:: CalendarEvent Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: create() .. py:method:: get() Return the value for key if key is in the dictionary, else default. .. py:method:: update(**kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete() .. py:class:: CalendarEvents Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(from_date: datetime.datetime, to_date: datetime.datetime, participant_ids: list | None = None, event_type: str | None = None, sort: str | None = None, include_cancelled: bool | None = None, include_encounter_info: bool | None = None, exclude_assigned_to_encounter_events: bool | None = None, viewer_timezone: str | None = None, *args, **kwargs) .. py:class:: Schedules Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(ids: list, from_date: datetime.datetime, to_date: datetime.datetime, include_cancelled: bool | None = None, available: bool = False, full: bool = False, *args, **kwargs) .. py:class:: WorkHours Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: iterator .. py:method:: get(from_date: datetime.datetime, to_date: datetime.datetime, psm_ids: list | None = None, timezone: str | None = None, *args, **kwargs) .. py:class:: CarePlan Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: subresources .. py:method:: create(patient_id: str) .. py:method:: get(patient_id: str) Return the value for key if key is in the dictionary, else default. .. py:class:: CarePlanOverview Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: update(patient_id: str) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:class:: CDT Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: create(patient_id: str) .. py:method:: get(patient_id: str) Return the value for key if key is in the dictionary, else default. .. py:method:: update(patient_id: str, **kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete(patient_id: str) .. py:class:: CDTs Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, cdt_name: str, fields: list | None = None, filters: dict | None = None, date_start: datetime.datetime | None = None, date_end: datetime.datetime | None = None, sort: str | None = None, *args, **kwargs) .. py:method:: update(patient_id: str, cdt_name: str, body: dict | None = None, **kwargs) .. py:class:: Chat Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: create(patient_id: str) .. py:class:: Chats Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, include_archived: bool = False, *args, **kwargs) .. py:class:: SearchChats Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, query: str, content_page_size: int = 20, include_archived: bool = False, *args, **kwargs) .. py:class:: DocumentSummaries Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, *args, **kwargs) .. py:class:: DocumentSummary Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: subresources .. py:method:: get(patient_id: str) Return the value for key if key is in the dictionary, else default. .. py:method:: create(patient_id: str) .. py:method:: delete(patient_id: str) .. py:class:: DocumentSummaryFile Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: get(patient_id: str, document_summary_id: str) -> io.BytesIO Return the value for key if key is in the dictionary, else default. .. py:class:: DocumentSummaryFiles Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: create(patient_id: str, document_summary_id: str, files: list | None = None, *args, **kwargs) .. py:class:: Email Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: get(patient_id: str, *args, **kwargs) Return the value for key if key is in the dictionary, else default. .. py:class:: Emails Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, sort: str | None = None, *args, **kwargs) .. py:class:: Encounter Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: subresources .. py:attribute:: nested_objects .. py:method:: create(patient_id: str) .. py:method:: get(patient_id: str, related_data: bool = False) Return the value for key if key is in the dictionary, else default. .. py:method:: update(patient_id: str, **kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete(patient_id: str) .. py:class:: EncounterDisposition Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: get(patient_id: str, encounter_id: str) Return the value for key if key is in the dictionary, else default. .. py:method:: update(patient_id: str, encounter_id: str, **kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:class:: Encounters Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str | None = None, user_id: str | None = None, related_data: bool | None = None, with_care_team: bool | None = None, only_with_calendar_event: bool | None = None, statuses: list | None = None, sort: str | None = None, *args, **kwargs) .. py:class:: CDTRecordsExport Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(*args, **kwargs) .. py:class:: Formation(version: int | str = 'current') Bases: :py:obj:`welkin.util.Target` .. py:attribute:: Assessment .. py:attribute:: Assessments .. py:attribute:: CDT .. py:attribute:: CDTs .. py:attribute:: DocumentType .. py:attribute:: DocumentTypes .. py:attribute:: Encounter .. py:attribute:: EncounterDisposition .. py:attribute:: Encounters .. py:attribute:: Goal .. py:attribute:: Goals .. py:attribute:: Program .. py:attribute:: Programs .. py:class:: Patient Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: subresources .. py:method:: create() .. py:method:: get(expand: bool | None = None) Return the value for key if key is in the dictionary, else default. .. py:method:: update(**kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete() .. py:class:: Patients Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(filter: dict | None = None, *args, **kwargs) .. py:class:: PatientProgram Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: subresources .. py:attribute:: nested_objects .. py:method:: get(patient_id: str, assigned_programs: bool | None = None, sort: str | None = None, *args, **kwargs) Return the value for key if key is in the dictionary, else default. .. py:method:: update(patient_id: str, **kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete(patient_id: str) .. py:class:: PatientPrograms Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, assigned_programs: bool | None = None, sort: str | None = None, *args, **kwargs) .. py:class:: ProgramPhase Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:class:: ProgramPhases Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:class:: SMS Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: get(patient_id: str, *args, **kwargs) Return the value for key if key is in the dictionary, else default. .. py:class:: SMSes Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(patient_id: str, sort: str | None = None, *args, **kwargs) .. py:class:: User Bases: :py:obj:`welkin.models.base.Resource` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: subresources .. py:method:: create() .. py:method:: get() Return the value for key if key is in the dictionary, else default. .. py:method:: update(**kwargs) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] .. py:method:: delete() .. py:class:: Users Bases: :py:obj:`welkin.models.base.Collection` Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: resource .. py:attribute:: iterator .. py:method:: get(search: str | None = None, region: str | None = None, seat_assigned: bool | None = None, user_state: str | None = None, *args, **kwargs)