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
|
@@ -0,0 +1,134 @@
|
|
|
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, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.code import Code
|
|
24
|
+
from rxfoundry.clients.swifty_api.models.prescription_data import PrescriptionData
|
|
25
|
+
from rxfoundry.clients.swifty_api.models.prescription_message_task import PrescriptionMessageTask
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class PrescriptionChangeRequestResponse(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
PrescriptionChangeRequestResponse
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
message_id: Optional[StrictStr] = Field(default=None, description="The message id for this change request")
|
|
34
|
+
request_message_id: Optional[StrictStr] = Field(default=None, description="The message id for the original change request")
|
|
35
|
+
approval_type: Optional[StrictStr] = None
|
|
36
|
+
changed_prescription_data: Optional[PrescriptionData] = None
|
|
37
|
+
denial_codes: Optional[List[Code]] = None
|
|
38
|
+
approval_text: Optional[StrictStr] = Field(default=None, description="Any additional information about the approval.")
|
|
39
|
+
denial_text: Optional[StrictStr] = Field(default=None, description="Any additional information about the denial.")
|
|
40
|
+
pending_text: Optional[StrictStr] = Field(default=None, description="Any additional information about the pending request.")
|
|
41
|
+
tasks: Optional[List[PrescriptionMessageTask]] = None
|
|
42
|
+
__properties: ClassVar[List[str]] = ["message_id", "request_message_id", "approval_type", "changed_prescription_data", "denial_codes", "approval_text", "denial_text", "pending_text", "tasks"]
|
|
43
|
+
|
|
44
|
+
@field_validator('approval_type')
|
|
45
|
+
def approval_type_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value is None:
|
|
48
|
+
return value
|
|
49
|
+
|
|
50
|
+
if value not in set(['approved', 'approved_with_changes', 'denied', 'pending']):
|
|
51
|
+
raise ValueError("must be one of enum values ('approved', 'approved_with_changes', 'denied', 'pending')")
|
|
52
|
+
return value
|
|
53
|
+
|
|
54
|
+
model_config = ConfigDict(
|
|
55
|
+
populate_by_name=True,
|
|
56
|
+
validate_assignment=True,
|
|
57
|
+
protected_namespaces=(),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def to_str(self) -> str:
|
|
62
|
+
"""Returns the string representation of the model using alias"""
|
|
63
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
64
|
+
|
|
65
|
+
def to_json(self) -> str:
|
|
66
|
+
"""Returns the JSON representation of the model using alias"""
|
|
67
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
68
|
+
return json.dumps(self.to_dict())
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
72
|
+
"""Create an instance of PrescriptionChangeRequestResponse from a JSON string"""
|
|
73
|
+
return cls.from_dict(json.loads(json_str))
|
|
74
|
+
|
|
75
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
76
|
+
"""Return the dictionary representation of the model using alias.
|
|
77
|
+
|
|
78
|
+
This has the following differences from calling pydantic's
|
|
79
|
+
`self.model_dump(by_alias=True)`:
|
|
80
|
+
|
|
81
|
+
* `None` is only added to the output dict for nullable fields that
|
|
82
|
+
were set at model initialization. Other fields with value `None`
|
|
83
|
+
are ignored.
|
|
84
|
+
"""
|
|
85
|
+
excluded_fields: Set[str] = set([
|
|
86
|
+
])
|
|
87
|
+
|
|
88
|
+
_dict = self.model_dump(
|
|
89
|
+
by_alias=True,
|
|
90
|
+
exclude=excluded_fields,
|
|
91
|
+
exclude_none=True,
|
|
92
|
+
)
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of changed_prescription_data
|
|
94
|
+
if self.changed_prescription_data:
|
|
95
|
+
_dict['changed_prescription_data'] = self.changed_prescription_data.to_dict()
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of each item in denial_codes (list)
|
|
97
|
+
_items = []
|
|
98
|
+
if self.denial_codes:
|
|
99
|
+
for _item_denial_codes in self.denial_codes:
|
|
100
|
+
if _item_denial_codes:
|
|
101
|
+
_items.append(_item_denial_codes.to_dict())
|
|
102
|
+
_dict['denial_codes'] = _items
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of each item in tasks (list)
|
|
104
|
+
_items = []
|
|
105
|
+
if self.tasks:
|
|
106
|
+
for _item_tasks in self.tasks:
|
|
107
|
+
if _item_tasks:
|
|
108
|
+
_items.append(_item_tasks.to_dict())
|
|
109
|
+
_dict['tasks'] = _items
|
|
110
|
+
return _dict
|
|
111
|
+
|
|
112
|
+
@classmethod
|
|
113
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
114
|
+
"""Create an instance of PrescriptionChangeRequestResponse from a dict"""
|
|
115
|
+
if obj is None:
|
|
116
|
+
return None
|
|
117
|
+
|
|
118
|
+
if not isinstance(obj, dict):
|
|
119
|
+
return cls.model_validate(obj)
|
|
120
|
+
|
|
121
|
+
_obj = cls.model_validate({
|
|
122
|
+
"message_id": obj.get("message_id"),
|
|
123
|
+
"request_message_id": obj.get("request_message_id"),
|
|
124
|
+
"approval_type": obj.get("approval_type"),
|
|
125
|
+
"changed_prescription_data": PrescriptionData.from_dict(obj["changed_prescription_data"]) if obj.get("changed_prescription_data") is not None else None,
|
|
126
|
+
"denial_codes": [Code.from_dict(_item) for _item in obj["denial_codes"]] if obj.get("denial_codes") is not None else None,
|
|
127
|
+
"approval_text": obj.get("approval_text"),
|
|
128
|
+
"denial_text": obj.get("denial_text"),
|
|
129
|
+
"pending_text": obj.get("pending_text"),
|
|
130
|
+
"tasks": [PrescriptionMessageTask.from_dict(_item) for _item in obj["tasks"]] if obj.get("tasks") is not None else None
|
|
131
|
+
})
|
|
132
|
+
return _obj
|
|
133
|
+
|
|
134
|
+
|
|
@@ -0,0 +1,126 @@
|
|
|
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 datetime import date
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
24
|
+
from rxfoundry.clients.swifty_api.models.code import Code
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class PrescriptionData(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
PrescriptionData
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
source: StrictStr = Field(description="The source of this prescription data.")
|
|
33
|
+
external_rx_number: Optional[StrictStr] = Field(default=None, description="The prescription number as it appears in the system sending this prescription.")
|
|
34
|
+
external_system_slug: Optional[StrictStr] = Field(default=None, description="The slug of the system sending this prescription.")
|
|
35
|
+
patient_ref: StrictStr = Field(description="The identifier for the patient. It can be the patient uuid or the patient external identifier in the form slug:identifier")
|
|
36
|
+
prescriber_ref: StrictStr = Field(description="The identifier for the prescriber. It can be the prescriber uuid or the prescriber's npi.")
|
|
37
|
+
from_pharmacy_ref: Optional[StrictStr] = Field(default=None, description="The identifier for the transferring pharmacy if this is a transfer. It can be the pharmacy uuid or the pharmacy's npi.")
|
|
38
|
+
medication_ref: StrictStr = Field(description="The identifier for the medication. It can be the medication uuid or an ndc for a medication variant of the medication.")
|
|
39
|
+
number_of_refills: StrictInt = Field(description="The number of refills for the prescription. This is the total fills - 1.")
|
|
40
|
+
quantity_value: Union[StrictFloat, StrictInt] = Field(description="The total quantity prescribed for the prescription. It should be equal to Days_Supply * (number_of_refills + 1)")
|
|
41
|
+
quantity_uom_code: Optional[Code] = None
|
|
42
|
+
days_supply: StrictInt = Field(description="The number of days a fill will last when taken as prescribed.")
|
|
43
|
+
written_date: date
|
|
44
|
+
substitutions_code: Optional[StrictStr] = Field(default=None, description="The code for the substitutions. It should be one of the values in the list TherapeuticSubstitutionIndicatorType")
|
|
45
|
+
sig_text: StrictStr = Field(description="The instructions on how to take the prescription.")
|
|
46
|
+
__properties: ClassVar[List[str]] = ["source", "external_rx_number", "external_system_slug", "patient_ref", "prescriber_ref", "from_pharmacy_ref", "medication_ref", "number_of_refills", "quantity_value", "quantity_uom_code", "days_supply", "written_date", "substitutions_code", "sig_text"]
|
|
47
|
+
|
|
48
|
+
@field_validator('source')
|
|
49
|
+
def source_validate_enum(cls, value):
|
|
50
|
+
"""Validates the enum"""
|
|
51
|
+
if value not in set(['SwiftyDirect_RxTransfer_In', 'SwiftyDirect_NewRx']):
|
|
52
|
+
raise ValueError("must be one of enum values ('SwiftyDirect_RxTransfer_In', 'SwiftyDirect_NewRx')")
|
|
53
|
+
return value
|
|
54
|
+
|
|
55
|
+
model_config = ConfigDict(
|
|
56
|
+
populate_by_name=True,
|
|
57
|
+
validate_assignment=True,
|
|
58
|
+
protected_namespaces=(),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def to_str(self) -> str:
|
|
63
|
+
"""Returns the string representation of the model using alias"""
|
|
64
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
65
|
+
|
|
66
|
+
def to_json(self) -> str:
|
|
67
|
+
"""Returns the JSON representation of the model using alias"""
|
|
68
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
69
|
+
return json.dumps(self.to_dict())
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
73
|
+
"""Create an instance of PrescriptionData from a JSON string"""
|
|
74
|
+
return cls.from_dict(json.loads(json_str))
|
|
75
|
+
|
|
76
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
77
|
+
"""Return the dictionary representation of the model using alias.
|
|
78
|
+
|
|
79
|
+
This has the following differences from calling pydantic's
|
|
80
|
+
`self.model_dump(by_alias=True)`:
|
|
81
|
+
|
|
82
|
+
* `None` is only added to the output dict for nullable fields that
|
|
83
|
+
were set at model initialization. Other fields with value `None`
|
|
84
|
+
are ignored.
|
|
85
|
+
"""
|
|
86
|
+
excluded_fields: Set[str] = set([
|
|
87
|
+
])
|
|
88
|
+
|
|
89
|
+
_dict = self.model_dump(
|
|
90
|
+
by_alias=True,
|
|
91
|
+
exclude=excluded_fields,
|
|
92
|
+
exclude_none=True,
|
|
93
|
+
)
|
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of quantity_uom_code
|
|
95
|
+
if self.quantity_uom_code:
|
|
96
|
+
_dict['quantity_uom_code'] = self.quantity_uom_code.to_dict()
|
|
97
|
+
return _dict
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
101
|
+
"""Create an instance of PrescriptionData from a dict"""
|
|
102
|
+
if obj is None:
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
if not isinstance(obj, dict):
|
|
106
|
+
return cls.model_validate(obj)
|
|
107
|
+
|
|
108
|
+
_obj = cls.model_validate({
|
|
109
|
+
"source": obj.get("source"),
|
|
110
|
+
"external_rx_number": obj.get("external_rx_number"),
|
|
111
|
+
"external_system_slug": obj.get("external_system_slug"),
|
|
112
|
+
"patient_ref": obj.get("patient_ref"),
|
|
113
|
+
"prescriber_ref": obj.get("prescriber_ref"),
|
|
114
|
+
"from_pharmacy_ref": obj.get("from_pharmacy_ref"),
|
|
115
|
+
"medication_ref": obj.get("medication_ref"),
|
|
116
|
+
"number_of_refills": obj.get("number_of_refills"),
|
|
117
|
+
"quantity_value": obj.get("quantity_value"),
|
|
118
|
+
"quantity_uom_code": Code.from_dict(obj["quantity_uom_code"]) if obj.get("quantity_uom_code") is not None else None,
|
|
119
|
+
"days_supply": obj.get("days_supply"),
|
|
120
|
+
"written_date": obj.get("written_date"),
|
|
121
|
+
"substitutions_code": obj.get("substitutions_code"),
|
|
122
|
+
"sig_text": obj.get("sig_text")
|
|
123
|
+
})
|
|
124
|
+
return _obj
|
|
125
|
+
|
|
126
|
+
|
|
@@ -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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from rxfoundry.clients.swifty_api.models.prescription_message_type import PrescriptionMessageType
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class PrescriptionMessage(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
PrescriptionMessage
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
uuid: Optional[StrictStr] = Field(default=None, description="The internal uuid for this message")
|
|
33
|
+
created_on: Optional[datetime] = Field(default=None, description="The date and time this message was created")
|
|
34
|
+
message_id: Optional[StrictStr] = Field(default=None, description="The external message id for this message")
|
|
35
|
+
message_type: Optional[PrescriptionMessageType] = None
|
|
36
|
+
is_completed: Optional[StrictBool] = Field(default=None, description="Whether or not this message has been completed")
|
|
37
|
+
message_json: Optional[Dict[str, Any]] = Field(default=None, description="The original message payload")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["uuid", "created_on", "message_id", "message_type", "is_completed", "message_json"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of PrescriptionMessage from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of PrescriptionMessage from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"uuid": obj.get("uuid"),
|
|
92
|
+
"created_on": obj.get("created_on"),
|
|
93
|
+
"message_id": obj.get("message_id"),
|
|
94
|
+
"message_type": obj.get("message_type"),
|
|
95
|
+
"is_completed": obj.get("is_completed"),
|
|
96
|
+
"message_json": obj.get("message_json")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PrescriptionMessageTask(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A prescription message task is a task that operates on a prescription message as part of a workflow to accomplish some overall goal.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
parent_task_type: Optional[StrictStr] = None
|
|
32
|
+
uuid: Optional[StrictStr] = None
|
|
33
|
+
created_on: Optional[datetime] = None
|
|
34
|
+
task_type: Optional[StrictStr] = None
|
|
35
|
+
is_completed: Optional[StrictBool] = None
|
|
36
|
+
manual_review_required: Optional[StrictBool] = None
|
|
37
|
+
__properties: ClassVar[List[str]] = ["parent_task_type", "uuid", "created_on", "task_type", "is_completed", "manual_review_required"]
|
|
38
|
+
|
|
39
|
+
@field_validator('parent_task_type')
|
|
40
|
+
def parent_task_type_validate_enum(cls, value):
|
|
41
|
+
"""Validates the enum"""
|
|
42
|
+
if value is None:
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
if value not in set(['prescription_message']):
|
|
46
|
+
raise ValueError("must be one of enum values ('prescription_message')")
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
model_config = ConfigDict(
|
|
50
|
+
populate_by_name=True,
|
|
51
|
+
validate_assignment=True,
|
|
52
|
+
protected_namespaces=(),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def to_str(self) -> str:
|
|
57
|
+
"""Returns the string representation of the model using alias"""
|
|
58
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
59
|
+
|
|
60
|
+
def to_json(self) -> str:
|
|
61
|
+
"""Returns the JSON representation of the model using alias"""
|
|
62
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
63
|
+
return json.dumps(self.to_dict())
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
67
|
+
"""Create an instance of PrescriptionMessageTask from a JSON string"""
|
|
68
|
+
return cls.from_dict(json.loads(json_str))
|
|
69
|
+
|
|
70
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
71
|
+
"""Return the dictionary representation of the model using alias.
|
|
72
|
+
|
|
73
|
+
This has the following differences from calling pydantic's
|
|
74
|
+
`self.model_dump(by_alias=True)`:
|
|
75
|
+
|
|
76
|
+
* `None` is only added to the output dict for nullable fields that
|
|
77
|
+
were set at model initialization. Other fields with value `None`
|
|
78
|
+
are ignored.
|
|
79
|
+
"""
|
|
80
|
+
excluded_fields: Set[str] = set([
|
|
81
|
+
])
|
|
82
|
+
|
|
83
|
+
_dict = self.model_dump(
|
|
84
|
+
by_alias=True,
|
|
85
|
+
exclude=excluded_fields,
|
|
86
|
+
exclude_none=True,
|
|
87
|
+
)
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of PrescriptionMessageTask from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"parent_task_type": obj.get("parent_task_type"),
|
|
101
|
+
"uuid": obj.get("uuid"),
|
|
102
|
+
"created_on": obj.get("created_on"),
|
|
103
|
+
"task_type": obj.get("task_type"),
|
|
104
|
+
"is_completed": obj.get("is_completed"),
|
|
105
|
+
"manual_review_required": obj.get("manual_review_required")
|
|
106
|
+
})
|
|
107
|
+
return _obj
|
|
108
|
+
|
|
109
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from rxfoundry.clients.swifty_api.models.status_type import StatusType
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class PrescriptionMessageTaskStatus(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
PrescriptionMessageTaskStatus
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
uuid: Optional[StrictStr] = None
|
|
33
|
+
status_type: Optional[StatusType] = None
|
|
34
|
+
status_date_time: Optional[datetime] = None
|
|
35
|
+
status_info: Optional[Dict[str, Any]] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["uuid", "status_type", "status_date_time", "status_info"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of PrescriptionMessageTaskStatus from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of status_type
|
|
78
|
+
if self.status_type:
|
|
79
|
+
_dict['status_type'] = self.status_type.to_dict()
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of PrescriptionMessageTaskStatus from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"uuid": obj.get("uuid"),
|
|
93
|
+
"status_type": StatusType.from_dict(obj["status_type"]) if obj.get("status_type") is not None else None,
|
|
94
|
+
"status_date_time": obj.get("status_date_time"),
|
|
95
|
+
"status_info": obj.get("status_info")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
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 json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PrescriptionMessageTaskType(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
PrescriptionMessageTaskType
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
IMAGE_GENERATE = 'IMAGE_GENERATE'
|
|
31
|
+
FAX_IMAGE_GENERATE = 'FAX_IMAGE_GENERATE'
|
|
32
|
+
FAX_SEND = 'FAX_SEND'
|
|
33
|
+
NEW_RX_PARSE = 'NEW_RX_PARSE'
|
|
34
|
+
RX_LOOKUP = 'RX_LOOKUP'
|
|
35
|
+
RX_REQUEST_RESPONSE = 'RX_REQUEST_RESPONSE'
|
|
36
|
+
XML_TRANSFER_GENERATE = 'XML_TRANSFER_GENERATE'
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_json(cls, json_str: str) -> Self:
|
|
40
|
+
"""Create an instance of PrescriptionMessageTaskType from a JSON string"""
|
|
41
|
+
return cls(json.loads(json_str))
|
|
42
|
+
|
|
43
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
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 json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PrescriptionMessageType(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
PrescriptionMessageType
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
RXCHANGEREQUEST = 'RxChangeRequest'
|
|
31
|
+
SWIFTY_DIRECT_RX_CHANGE_REQUEST = 'SwiftyDirect_RxChangeRequest'
|
|
32
|
+
SURESCRIPTS_RX_CHANGE_REQUEST = 'Surescripts_RxChangeRequest'
|
|
33
|
+
FAX_CHANGE_REQUEST = 'Fax_ChangeRequest'
|
|
34
|
+
RX_TRANSFER_REQUEST_OUT = 'RxTransferRequest_Out'
|
|
35
|
+
SURESCRIPTS_RX_TRANSFER_OUT = 'Surescripts_RxTransfer_Out'
|
|
36
|
+
SURESCRIPTS_RX_TRANSFER_IN = 'Surescripts_RxTransfer_In'
|
|
37
|
+
FAX_RX_TRANSFER_OUT = 'Fax_RxTransfer_Out'
|
|
38
|
+
FAX_RX_TRANSFER_IN = 'Fax_RxTransfer_In'
|
|
39
|
+
CENTER_WELL_RX_TRANSFER_OUT = 'CenterWell_RxTransfer_Out'
|
|
40
|
+
HEALTH_DYNE_RX_TRANSFER_OUT = 'HealthDyne_RxTransfer_Out'
|
|
41
|
+
SWIFTY_DIRECT_RX_TRANSFER_IN = 'SwiftyDirect_RxTransfer_In'
|
|
42
|
+
SURESCRIPTS_NEW_RX = 'Surescripts_NewRx'
|
|
43
|
+
SWIFTY_DIRECT_NEW_RX = 'SwiftyDirect_NewRx'
|
|
44
|
+
FAX_NEW_RX = 'Fax_NewRx'
|
|
45
|
+
VOICE_NEW_RX = 'Voice_NewRx'
|
|
46
|
+
MANUAL_NEW_RX = 'Manual_NewRx'
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Self:
|
|
50
|
+
"""Create an instance of PrescriptionMessageType from a JSON string"""
|
|
51
|
+
return cls(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
|