rxfoundry.clients.swifty-api 0.0.652__py3-none-any.whl → 0.1.1009__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rxfoundry/clients/swifty_api/__init__.py +38 -3
- rxfoundry/clients/swifty_api/api/__init__.py +3 -1
- rxfoundry/clients/swifty_api/api/async_api.py +2336 -52
- rxfoundry/clients/swifty_api/api/code_api.py +281 -0
- rxfoundry/clients/swifty_api/api/default_api.py +318 -0
- rxfoundry/clients/swifty_api/api/medication_api.py +647 -51
- rxfoundry/clients/swifty_api/api/patient_api.py +1429 -49
- rxfoundry/clients/swifty_api/api/pharmacist_api.py +24 -24
- rxfoundry/clients/swifty_api/api/pharmacy_api.py +48 -48
- rxfoundry/clients/swifty_api/api/prescriber_api.py +24 -24
- rxfoundry/clients/swifty_api/api/prescription_api.py +934 -130
- rxfoundry/clients/swifty_api/api/task_api.py +1835 -0
- rxfoundry/clients/swifty_api/api/tasks_api.py +374 -0
- rxfoundry/clients/swifty_api/api/validation_api.py +311 -0
- rxfoundry/clients/swifty_api/api/virtual_pharmacy_api.py +262 -0
- rxfoundry/clients/swifty_api/api/workflow_api.py +633 -0
- rxfoundry/clients/swifty_api/models/__init__.py +35 -2
- rxfoundry/clients/swifty_api/models/address.py +11 -10
- rxfoundry/clients/swifty_api/models/code_type.py +92 -0
- rxfoundry/clients/swifty_api/models/create_patient_request.py +98 -0
- rxfoundry/clients/swifty_api/models/formulary.py +96 -0
- rxfoundry/clients/swifty_api/models/insurance.py +96 -0
- rxfoundry/clients/swifty_api/models/medication_instruction.py +92 -0
- rxfoundry/clients/swifty_api/models/medication_ref.py +100 -0
- rxfoundry/clients/swifty_api/models/patient.py +88 -3
- rxfoundry/clients/swifty_api/models/patient_activity_data.py +169 -0
- rxfoundry/clients/swifty_api/models/patient_activity_message.py +112 -0
- rxfoundry/clients/swifty_api/models/patient_activity_notification.py +9 -17
- rxfoundry/clients/swifty_api/models/patient_activity_notification_activity_data.py +39 -8
- rxfoundry/clients/swifty_api/models/patient_address_activity_notification.py +105 -0
- rxfoundry/clients/swifty_api/models/patient_address_data.py +26 -10
- rxfoundry/clients/swifty_api/models/patient_allergy.py +92 -0
- rxfoundry/clients/swifty_api/models/patient_condition.py +92 -0
- rxfoundry/clients/swifty_api/models/patient_data.py +13 -2
- rxfoundry/clients/swifty_api/models/patient_external_identifier.py +6 -5
- rxfoundry/clients/swifty_api/models/patient_health_profile_data.py +127 -0
- rxfoundry/clients/swifty_api/models/patient_insurance.py +106 -0
- rxfoundry/clients/swifty_api/models/patient_insurance_data.py +105 -0
- rxfoundry/clients/swifty_api/models/patient_medication.py +92 -0
- rxfoundry/clients/swifty_api/models/patient_name.py +99 -0
- rxfoundry/clients/swifty_api/models/patient_name_data.py +108 -0
- rxfoundry/clients/swifty_api/models/patient_phone_number.py +89 -0
- rxfoundry/clients/swifty_api/models/patient_phone_number_data.py +98 -0
- rxfoundry/clients/swifty_api/models/patient_task.py +115 -0
- rxfoundry/clients/swifty_api/models/patient_task_status.py +105 -0
- rxfoundry/clients/swifty_api/models/patient_task_type.py +45 -0
- rxfoundry/clients/swifty_api/models/prescription.py +35 -30
- rxfoundry/clients/swifty_api/models/prescription_change_request.py +24 -36
- rxfoundry/clients/swifty_api/models/prescription_change_request_and_response.py +145 -0
- rxfoundry/clients/swifty_api/models/prescription_change_request_response.py +134 -0
- rxfoundry/clients/swifty_api/models/prescription_data.py +126 -0
- rxfoundry/clients/swifty_api/models/prescription_message.py +100 -0
- rxfoundry/clients/swifty_api/models/prescription_message_task.py +109 -0
- rxfoundry/clients/swifty_api/models/prescription_message_task_status.py +99 -0
- rxfoundry/clients/swifty_api/models/prescription_message_task_type.py +43 -0
- rxfoundry/clients/swifty_api/models/prescription_message_type.py +53 -0
- rxfoundry/clients/swifty_api/models/prescription_patch.py +6 -2
- rxfoundry/clients/swifty_api/models/prescription_status_type.py +40 -0
- rxfoundry/clients/swifty_api/models/prescription_task.py +14 -12
- rxfoundry/clients/swifty_api/models/prescription_task_status.py +6 -2
- rxfoundry/clients/swifty_api/models/prescription_task_type.py +42 -0
- rxfoundry/clients/swifty_api/models/prescription_transfer_request_and_response.py +145 -0
- rxfoundry/clients/swifty_api/models/prescription_transfer_request_response.py +128 -0
- rxfoundry/clients/swifty_api/models/status_type.py +92 -0
- rxfoundry/clients/swifty_api/models/workflow.py +108 -0
- rxfoundry/clients/swifty_api/models/workflow_sub_task.py +96 -0
- rxfoundry/clients/swifty_api/models/workflow_sub_task_sub_task.py +155 -0
- rxfoundry/clients/swifty_api/models/workflow_task.py +111 -0
- rxfoundry/clients/swifty_api/models/workflow_task_task.py +155 -0
- rxfoundry/clients/swifty_api/models/workflow_type.py +55 -0
- {rxfoundry_clients_swifty_api-0.0.652.dist-info → rxfoundry_clients_swifty_api-0.1.1009.dist-info}/METADATA +1 -1
- rxfoundry_clients_swifty_api-0.1.1009.dist-info/RECORD +110 -0
- {rxfoundry_clients_swifty_api-0.0.652.dist-info → rxfoundry_clients_swifty_api-0.1.1009.dist-info}/WHEEL +1 -1
- rxfoundry_clients_swifty_api-0.0.652.dist-info/RECORD +0 -64
- {rxfoundry_clients_swifty_api-0.0.652.dist-info → rxfoundry_clients_swifty_api-0.1.1009.dist-info}/top_level.txt +0 -0
|
@@ -19,17 +19,34 @@ from rxfoundry.clients.swifty_api.models.address import Address
|
|
|
19
19
|
from rxfoundry.clients.swifty_api.models.asynchronous_response import AsynchronousResponse
|
|
20
20
|
from rxfoundry.clients.swifty_api.models.code import Code
|
|
21
21
|
from rxfoundry.clients.swifty_api.models.code_qualifier_code import CodeQualifierCode
|
|
22
|
+
from rxfoundry.clients.swifty_api.models.code_type import CodeType
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.create_patient_request import CreatePatientRequest
|
|
22
24
|
from rxfoundry.clients.swifty_api.models.error_message import ErrorMessage
|
|
23
25
|
from rxfoundry.clients.swifty_api.models.fax import Fax
|
|
26
|
+
from rxfoundry.clients.swifty_api.models.formulary import Formulary
|
|
27
|
+
from rxfoundry.clients.swifty_api.models.insurance import Insurance
|
|
24
28
|
from rxfoundry.clients.swifty_api.models.medication import Medication
|
|
29
|
+
from rxfoundry.clients.swifty_api.models.medication_instruction import MedicationInstruction
|
|
25
30
|
from rxfoundry.clients.swifty_api.models.medication_program_pricing import MedicationProgramPricing
|
|
31
|
+
from rxfoundry.clients.swifty_api.models.medication_ref import MedicationRef
|
|
26
32
|
from rxfoundry.clients.swifty_api.models.medication_variant import MedicationVariant
|
|
27
33
|
from rxfoundry.clients.swifty_api.models.patient import Patient
|
|
34
|
+
from rxfoundry.clients.swifty_api.models.patient_activity_data import PatientActivityData
|
|
35
|
+
from rxfoundry.clients.swifty_api.models.patient_activity_message import PatientActivityMessage
|
|
28
36
|
from rxfoundry.clients.swifty_api.models.patient_activity_notification import PatientActivityNotification
|
|
29
|
-
from rxfoundry.clients.swifty_api.models.patient_activity_notification_activity_data import PatientActivityNotificationActivityData
|
|
30
37
|
from rxfoundry.clients.swifty_api.models.patient_address_data import PatientAddressData
|
|
38
|
+
from rxfoundry.clients.swifty_api.models.patient_allergy import PatientAllergy
|
|
39
|
+
from rxfoundry.clients.swifty_api.models.patient_condition import PatientCondition
|
|
31
40
|
from rxfoundry.clients.swifty_api.models.patient_data import PatientData
|
|
32
41
|
from rxfoundry.clients.swifty_api.models.patient_external_identifier import PatientExternalIdentifier
|
|
42
|
+
from rxfoundry.clients.swifty_api.models.patient_health_profile_data import PatientHealthProfileData
|
|
43
|
+
from rxfoundry.clients.swifty_api.models.patient_insurance_data import PatientInsuranceData
|
|
44
|
+
from rxfoundry.clients.swifty_api.models.patient_medication import PatientMedication
|
|
45
|
+
from rxfoundry.clients.swifty_api.models.patient_name import PatientName
|
|
46
|
+
from rxfoundry.clients.swifty_api.models.patient_phone_number import PatientPhoneNumber
|
|
47
|
+
from rxfoundry.clients.swifty_api.models.patient_task import PatientTask
|
|
48
|
+
from rxfoundry.clients.swifty_api.models.patient_task_status import PatientTaskStatus
|
|
49
|
+
from rxfoundry.clients.swifty_api.models.patient_task_type import PatientTaskType
|
|
33
50
|
from rxfoundry.clients.swifty_api.models.pharmacist import Pharmacist
|
|
34
51
|
from rxfoundry.clients.swifty_api.models.pharmacy import Pharmacy
|
|
35
52
|
from rxfoundry.clients.swifty_api.models.pharmacy_chain import PharmacyChain
|
|
@@ -38,16 +55,32 @@ from rxfoundry.clients.swifty_api.models.pharmacy_program_pricing import Pharmac
|
|
|
38
55
|
from rxfoundry.clients.swifty_api.models.prescriber import Prescriber
|
|
39
56
|
from rxfoundry.clients.swifty_api.models.prescription import Prescription
|
|
40
57
|
from rxfoundry.clients.swifty_api.models.prescription_change_request import PrescriptionChangeRequest
|
|
58
|
+
from rxfoundry.clients.swifty_api.models.prescription_change_request_and_response import PrescriptionChangeRequestAndResponse
|
|
59
|
+
from rxfoundry.clients.swifty_api.models.prescription_change_request_response import PrescriptionChangeRequestResponse
|
|
60
|
+
from rxfoundry.clients.swifty_api.models.prescription_data import PrescriptionData
|
|
41
61
|
from rxfoundry.clients.swifty_api.models.prescription_issue import PrescriptionIssue
|
|
62
|
+
from rxfoundry.clients.swifty_api.models.prescription_message import PrescriptionMessage
|
|
63
|
+
from rxfoundry.clients.swifty_api.models.prescription_message_task import PrescriptionMessageTask
|
|
64
|
+
from rxfoundry.clients.swifty_api.models.prescription_message_task_status import PrescriptionMessageTaskStatus
|
|
65
|
+
from rxfoundry.clients.swifty_api.models.prescription_message_task_type import PrescriptionMessageTaskType
|
|
66
|
+
from rxfoundry.clients.swifty_api.models.prescription_message_type import PrescriptionMessageType
|
|
42
67
|
from rxfoundry.clients.swifty_api.models.prescription_patch import PrescriptionPatch
|
|
68
|
+
from rxfoundry.clients.swifty_api.models.prescription_status_type import PrescriptionStatusType
|
|
43
69
|
from rxfoundry.clients.swifty_api.models.prescription_task import PrescriptionTask
|
|
44
70
|
from rxfoundry.clients.swifty_api.models.prescription_task_status import PrescriptionTaskStatus
|
|
71
|
+
from rxfoundry.clients.swifty_api.models.prescription_task_type import PrescriptionTaskType
|
|
45
72
|
from rxfoundry.clients.swifty_api.models.prescription_transfer_request import PrescriptionTransferRequest
|
|
73
|
+
from rxfoundry.clients.swifty_api.models.prescription_transfer_request_and_response import PrescriptionTransferRequestAndResponse
|
|
74
|
+
from rxfoundry.clients.swifty_api.models.prescription_transfer_request_response import PrescriptionTransferRequestResponse
|
|
46
75
|
from rxfoundry.clients.swifty_api.models.prescription_verification import PrescriptionVerification
|
|
47
76
|
from rxfoundry.clients.swifty_api.models.pricing_program import PricingProgram
|
|
48
|
-
from rxfoundry.clients.swifty_api.models.
|
|
77
|
+
from rxfoundry.clients.swifty_api.models.status_type import StatusType
|
|
49
78
|
from rxfoundry.clients.swifty_api.models.token import Token
|
|
50
79
|
from rxfoundry.clients.swifty_api.models.user import User
|
|
51
80
|
from rxfoundry.clients.swifty_api.models.version import Version
|
|
52
81
|
from rxfoundry.clients.swifty_api.models.virtual_pharmacy import VirtualPharmacy
|
|
82
|
+
from rxfoundry.clients.swifty_api.models.workflow import Workflow
|
|
53
83
|
from rxfoundry.clients.swifty_api.models.workflow_request import WorkflowRequest
|
|
84
|
+
from rxfoundry.clients.swifty_api.models.workflow_task import WorkflowTask
|
|
85
|
+
from rxfoundry.clients.swifty_api.models.workflow_task_task import WorkflowTaskTask
|
|
86
|
+
from rxfoundry.clients.swifty_api.models.workflow_type import WorkflowType
|
|
@@ -18,8 +18,9 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -28,15 +29,15 @@ class Address(BaseModel):
|
|
|
28
29
|
Address
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
uuid: Optional[StrictStr] = None
|
|
31
|
-
address_line_one: Optional[
|
|
32
|
-
address_line_two: Optional[
|
|
33
|
-
city: Optional[
|
|
34
|
-
state_province: Optional[
|
|
35
|
-
postal_code: Optional[
|
|
36
|
-
country_code: Optional[
|
|
37
|
-
longitude: Optional[Union[
|
|
38
|
-
latitude: Optional[Union[
|
|
39
|
-
distance: Optional[Union[StrictFloat, StrictInt]] = None
|
|
32
|
+
address_line_one: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The first line of the address")
|
|
33
|
+
address_line_two: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The second line of the address")
|
|
34
|
+
city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The city")
|
|
35
|
+
state_province: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The state or province using the two alphabetic character abbreviation (e.g. TX, CA, NY)")
|
|
36
|
+
postal_code: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The postal code in 5 digit format")
|
|
37
|
+
country_code: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The country code using the two alphabetic character abbreviation (e.g. US, CA, GB)")
|
|
38
|
+
longitude: Optional[Union[Annotated[float, Field(strict=True)], Annotated[int, Field(strict=True)]]] = Field(default=None, description="The longitude of the address")
|
|
39
|
+
latitude: Optional[Union[Annotated[float, Field(strict=True)], Annotated[int, Field(strict=True)]]] = Field(default=None, description="The latitude of the address")
|
|
40
|
+
distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The distance in miles from this address to another lat/lon passed in during search. This is a derived field, not a field that is stored in the database.")
|
|
40
41
|
__properties: ClassVar[List[str]] = ["uuid", "address_line_one", "address_line_two", "city", "state_province", "postal_code", "country_code", "longitude", "latitude", "distance"]
|
|
41
42
|
|
|
42
43
|
model_config = ConfigDict(
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class CodeType(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CodeType
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
uuid: Optional[StrictStr] = None
|
|
31
|
+
type_name: Optional[StrictStr] = None
|
|
32
|
+
description: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["uuid", "type_name", "description"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of CodeType from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of CodeType from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"uuid": obj.get("uuid"),
|
|
87
|
+
"type_name": obj.get("type_name"),
|
|
88
|
+
"description": obj.get("description")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
91
|
+
|
|
92
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.patient_address_data import PatientAddressData
|
|
24
|
+
from rxfoundry.clients.swifty_api.models.patient_data import PatientData
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class CreatePatientRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Request wrapper for creating a patient
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
patient: PatientData
|
|
33
|
+
address: Optional[PatientAddressData] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["patient", "address"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of CreatePatientRequest from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of patient
|
|
76
|
+
if self.patient:
|
|
77
|
+
_dict['patient'] = self.patient.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of address
|
|
79
|
+
if self.address:
|
|
80
|
+
_dict['address'] = self.address.to_dict()
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of CreatePatientRequest from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"patient": PatientData.from_dict(obj["patient"]) if obj.get("patient") is not None else None,
|
|
94
|
+
"address": PatientAddressData.from_dict(obj["address"]) if obj.get("address") is not None else None
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class Formulary(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Formulary
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
uuid: Optional[StrictStr] = None
|
|
31
|
+
name: Optional[StrictStr] = Field(default=None, description="The name of the formulary")
|
|
32
|
+
description: Optional[StrictStr] = Field(default=None, description="The description of the formulary")
|
|
33
|
+
is_active: Optional[StrictBool] = Field(default=None, description="Whether the formulary is active")
|
|
34
|
+
is_default: Optional[StrictBool] = Field(default=None, description="Whether the formulary is the default formulary")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["uuid", "name", "description", "is_active", "is_default"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of Formulary from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of Formulary from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"uuid": obj.get("uuid"),
|
|
89
|
+
"name": obj.get("name"),
|
|
90
|
+
"description": obj.get("description"),
|
|
91
|
+
"is_active": obj.get("is_active"),
|
|
92
|
+
"is_default": obj.get("is_default")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class Insurance(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Insurance
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
uuid: Optional[StrictStr] = None
|
|
31
|
+
member_id: Optional[StrictStr] = None
|
|
32
|
+
rx_bin: Optional[StrictStr] = None
|
|
33
|
+
rx_pcn: Optional[StrictStr] = None
|
|
34
|
+
rx_group: Optional[StrictStr] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["uuid", "member_id", "rx_bin", "rx_pcn", "rx_group"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of Insurance from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of Insurance from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"uuid": obj.get("uuid"),
|
|
89
|
+
"member_id": obj.get("member_id"),
|
|
90
|
+
"rx_bin": obj.get("rx_bin"),
|
|
91
|
+
"rx_pcn": obj.get("rx_pcn"),
|
|
92
|
+
"rx_group": obj.get("rx_group")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class MedicationInstruction(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
MedicationInstruction
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: Optional[StrictStr] = Field(default=None, description="The id of the instruction (in Typesense...may change over time)")
|
|
31
|
+
instruction_text: Optional[StrictStr] = Field(default=None, description="The instruction text for the medication")
|
|
32
|
+
usage_count: Optional[StrictInt] = Field(default=None, description="The number of times the instruction has been used")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["id", "instruction_text", "usage_count"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of MedicationInstruction from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of MedicationInstruction from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"id": obj.get("id"),
|
|
87
|
+
"instruction_text": obj.get("instruction_text"),
|
|
88
|
+
"usage_count": obj.get("usage_count")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
91
|
+
|
|
92
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class MedicationRef(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
MedicationRef
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
reference: Optional[StrictStr] = 'The reference to the medication in the external system'
|
|
31
|
+
reference_type: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["reference", "reference_type"]
|
|
33
|
+
|
|
34
|
+
@field_validator('reference_type')
|
|
35
|
+
def reference_type_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value is None:
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
if value not in set(['UUID', 'GPI', 'NDC', 'SCD', 'SBD']):
|
|
41
|
+
raise ValueError("must be one of enum values ('UUID', 'GPI', 'NDC', 'SCD', 'SBD')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of MedicationRef from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of MedicationRef from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"reference": obj.get("reference") if obj.get("reference") is not None else 'The reference to the medication in the external system',
|
|
96
|
+
"reference_type": obj.get("reference_type")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|