rxfoundry.clients.swifty-api 0.0.593__py3-none-any.whl → 1.0.0__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.
Files changed (61) hide show
  1. rxfoundry/clients/swifty_api/models/virtual_pharmacy.py +3 -1
  2. {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/METADATA +1 -1
  3. rxfoundry_clients_swifty_api-1.0.0.dist-info/RECORD +61 -0
  4. rxfoundry/clients/p2rx_api/__init__.py +0 -79
  5. rxfoundry/clients/p2rx_api/api/__init__.py +0 -17
  6. rxfoundry/clients/p2rx_api/api/async_api.py +0 -862
  7. rxfoundry/clients/p2rx_api/api/code_api.py +0 -337
  8. rxfoundry/clients/p2rx_api/api/fax_api.py +0 -632
  9. rxfoundry/clients/p2rx_api/api/medication_api.py +0 -666
  10. rxfoundry/clients/p2rx_api/api/patient_api.py +0 -981
  11. rxfoundry/clients/p2rx_api/api/pharmacist_api.py +0 -615
  12. rxfoundry/clients/p2rx_api/api/pharmacy_api.py +0 -684
  13. rxfoundry/clients/p2rx_api/api/prescriber_api.py +0 -615
  14. rxfoundry/clients/p2rx_api/api/prescription_api.py +0 -1864
  15. rxfoundry/clients/p2rx_api/api/token_api.py +0 -314
  16. rxfoundry/clients/p2rx_api/api/user_api.py +0 -306
  17. rxfoundry/clients/p2rx_api/api/version_api.py +0 -282
  18. rxfoundry/clients/p2rx_api/api/virtual_pharmacy_api.py +0 -284
  19. rxfoundry/clients/p2rx_api/api_client.py +0 -798
  20. rxfoundry/clients/p2rx_api/api_response.py +0 -21
  21. rxfoundry/clients/p2rx_api/configuration.py +0 -583
  22. rxfoundry/clients/p2rx_api/exceptions.py +0 -217
  23. rxfoundry/clients/p2rx_api/models/__init__.py +0 -50
  24. rxfoundry/clients/p2rx_api/models/address.py +0 -106
  25. rxfoundry/clients/p2rx_api/models/asynchronous_response.py +0 -90
  26. rxfoundry/clients/p2rx_api/models/code.py +0 -92
  27. rxfoundry/clients/p2rx_api/models/code_qualifier_code.py +0 -96
  28. rxfoundry/clients/p2rx_api/models/error_message.py +0 -90
  29. rxfoundry/clients/p2rx_api/models/fax.py +0 -141
  30. rxfoundry/clients/p2rx_api/models/medication.py +0 -137
  31. rxfoundry/clients/p2rx_api/models/medication_program_pricing.py +0 -99
  32. rxfoundry/clients/p2rx_api/models/medication_variant.py +0 -96
  33. rxfoundry/clients/p2rx_api/models/patient.py +0 -128
  34. rxfoundry/clients/p2rx_api/models/patient_activity_notification.py +0 -114
  35. rxfoundry/clients/p2rx_api/models/patient_external_identifier.py +0 -94
  36. rxfoundry/clients/p2rx_api/models/pharmacist.py +0 -104
  37. rxfoundry/clients/p2rx_api/models/pharmacy.py +0 -156
  38. rxfoundry/clients/p2rx_api/models/pharmacy_chain.py +0 -100
  39. rxfoundry/clients/p2rx_api/models/pharmacy_other_identifier.py +0 -98
  40. rxfoundry/clients/p2rx_api/models/pharmacy_program_pricing.py +0 -103
  41. rxfoundry/clients/p2rx_api/models/prescriber.py +0 -106
  42. rxfoundry/clients/p2rx_api/models/prescription.py +0 -278
  43. rxfoundry/clients/p2rx_api/models/prescription_change_request.py +0 -123
  44. rxfoundry/clients/p2rx_api/models/prescription_issue.py +0 -120
  45. rxfoundry/clients/p2rx_api/models/prescription_patch.py +0 -113
  46. rxfoundry/clients/p2rx_api/models/prescription_task.py +0 -130
  47. rxfoundry/clients/p2rx_api/models/prescription_task_status.py +0 -95
  48. rxfoundry/clients/p2rx_api/models/prescription_transfer_request.py +0 -93
  49. rxfoundry/clients/p2rx_api/models/prescription_verification.py +0 -107
  50. rxfoundry/clients/p2rx_api/models/pricing_program.py +0 -90
  51. rxfoundry/clients/p2rx_api/models/surescripts_message.py +0 -111
  52. rxfoundry/clients/p2rx_api/models/token.py +0 -92
  53. rxfoundry/clients/p2rx_api/models/user.py +0 -98
  54. rxfoundry/clients/p2rx_api/models/version.py +0 -88
  55. rxfoundry/clients/p2rx_api/models/virtual_pharmacy.py +0 -96
  56. rxfoundry/clients/p2rx_api/models/workflow_request.py +0 -90
  57. rxfoundry/clients/p2rx_api/py.typed +0 -0
  58. rxfoundry/clients/p2rx_api/rest.py +0 -259
  59. rxfoundry_clients_swifty_api-0.0.593.dist-info/RECORD +0 -116
  60. {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/WHEEL +0 -0
  61. {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/top_level.txt +0 -0
@@ -1,90 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- P2RX API
5
-
6
- API for the P2RX 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 ErrorMessage(BaseModel):
27
- """
28
- ErrorMessage
29
- """ # noqa: E501
30
- error_code: Optional[StrictStr] = None
31
- error_message: Optional[StrictStr] = None
32
- __properties: ClassVar[List[str]] = ["error_code", "error_message"]
33
-
34
- model_config = ConfigDict(
35
- populate_by_name=True,
36
- validate_assignment=True,
37
- protected_namespaces=(),
38
- )
39
-
40
-
41
- def to_str(self) -> str:
42
- """Returns the string representation of the model using alias"""
43
- return pprint.pformat(self.model_dump(by_alias=True))
44
-
45
- def to_json(self) -> str:
46
- """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
-
50
- @classmethod
51
- def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of ErrorMessage from a JSON string"""
53
- return cls.from_dict(json.loads(json_str))
54
-
55
- def to_dict(self) -> Dict[str, Any]:
56
- """Return the dictionary representation of the model using alias.
57
-
58
- This has the following differences from calling pydantic's
59
- `self.model_dump(by_alias=True)`:
60
-
61
- * `None` is only added to the output dict for nullable fields that
62
- were set at model initialization. Other fields with value `None`
63
- are ignored.
64
- """
65
- excluded_fields: Set[str] = set([
66
- ])
67
-
68
- _dict = self.model_dump(
69
- by_alias=True,
70
- exclude=excluded_fields,
71
- exclude_none=True,
72
- )
73
- return _dict
74
-
75
- @classmethod
76
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of ErrorMessage from a dict"""
78
- if obj is None:
79
- return None
80
-
81
- if not isinstance(obj, dict):
82
- return cls.model_validate(obj)
83
-
84
- _obj = cls.model_validate({
85
- "error_code": obj.get("error_code"),
86
- "error_message": obj.get("error_message")
87
- })
88
- return _obj
89
-
90
-
@@ -1,141 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- P2RX API
5
-
6
- API for the P2RX 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, StrictFloat, StrictInt, StrictStr
23
- from typing import Any, ClassVar, Dict, List, Optional, Union
24
- from rxfoundry.clients.swifty_api.models.medication import Medication
25
- from rxfoundry.clients.swifty_api.models.patient import Patient
26
- from rxfoundry.clients.swifty_api.models.prescriber import Prescriber
27
- from rxfoundry.clients.swifty_api.models.virtual_pharmacy import VirtualPharmacy
28
- from typing import Optional, Set
29
- from typing_extensions import Self
30
-
31
- class Fax(BaseModel):
32
- """
33
- Fax
34
- """ # noqa: E501
35
- uuid: Optional[StrictStr] = None
36
- fax_id: Optional[StrictStr] = None
37
- fax_date: Optional[datetime] = None
38
- to_fax_number: Optional[StrictStr] = None
39
- from_fax_number: Optional[StrictStr] = None
40
- filename: Optional[StrictStr] = None
41
- fax_image: Optional[StrictStr] = None
42
- fax_page_count: Optional[StrictInt] = None
43
- virtual_pharmacy: Optional[VirtualPharmacy] = None
44
- patient: Optional[Patient] = None
45
- prescriber: Optional[Prescriber] = None
46
- medication: Optional[Medication] = None
47
- ndc: Optional[StrictStr] = None
48
- days_supply: Optional[StrictInt] = None
49
- quantity_value: Optional[Union[StrictFloat, StrictInt]] = None
50
- number_of_fills: Optional[StrictInt] = None
51
- sig_text: Optional[StrictStr] = None
52
- is_completed: Optional[StrictBool] = None
53
- has_running_workflow: Optional[StrictBool] = None
54
- __properties: ClassVar[List[str]] = ["uuid", "fax_id", "fax_date", "to_fax_number", "from_fax_number", "filename", "fax_image", "fax_page_count", "virtual_pharmacy", "patient", "prescriber", "medication", "ndc", "days_supply", "quantity_value", "number_of_fills", "sig_text", "is_completed", "has_running_workflow"]
55
-
56
- model_config = ConfigDict(
57
- populate_by_name=True,
58
- validate_assignment=True,
59
- protected_namespaces=(),
60
- )
61
-
62
-
63
- def to_str(self) -> str:
64
- """Returns the string representation of the model using alias"""
65
- return pprint.pformat(self.model_dump(by_alias=True))
66
-
67
- def to_json(self) -> str:
68
- """Returns the JSON representation of the model using alias"""
69
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
70
- return json.dumps(self.to_dict())
71
-
72
- @classmethod
73
- def from_json(cls, json_str: str) -> Optional[Self]:
74
- """Create an instance of Fax from a JSON string"""
75
- return cls.from_dict(json.loads(json_str))
76
-
77
- def to_dict(self) -> Dict[str, Any]:
78
- """Return the dictionary representation of the model using alias.
79
-
80
- This has the following differences from calling pydantic's
81
- `self.model_dump(by_alias=True)`:
82
-
83
- * `None` is only added to the output dict for nullable fields that
84
- were set at model initialization. Other fields with value `None`
85
- are ignored.
86
- """
87
- excluded_fields: Set[str] = set([
88
- ])
89
-
90
- _dict = self.model_dump(
91
- by_alias=True,
92
- exclude=excluded_fields,
93
- exclude_none=True,
94
- )
95
- # override the default output from pydantic by calling `to_dict()` of virtual_pharmacy
96
- if self.virtual_pharmacy:
97
- _dict['virtual_pharmacy'] = self.virtual_pharmacy.to_dict()
98
- # override the default output from pydantic by calling `to_dict()` of patient
99
- if self.patient:
100
- _dict['patient'] = self.patient.to_dict()
101
- # override the default output from pydantic by calling `to_dict()` of prescriber
102
- if self.prescriber:
103
- _dict['prescriber'] = self.prescriber.to_dict()
104
- # override the default output from pydantic by calling `to_dict()` of medication
105
- if self.medication:
106
- _dict['medication'] = self.medication.to_dict()
107
- return _dict
108
-
109
- @classmethod
110
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
111
- """Create an instance of Fax from a dict"""
112
- if obj is None:
113
- return None
114
-
115
- if not isinstance(obj, dict):
116
- return cls.model_validate(obj)
117
-
118
- _obj = cls.model_validate({
119
- "uuid": obj.get("uuid"),
120
- "fax_id": obj.get("fax_id"),
121
- "fax_date": obj.get("fax_date"),
122
- "to_fax_number": obj.get("to_fax_number"),
123
- "from_fax_number": obj.get("from_fax_number"),
124
- "filename": obj.get("filename"),
125
- "fax_image": obj.get("fax_image"),
126
- "fax_page_count": obj.get("fax_page_count"),
127
- "virtual_pharmacy": VirtualPharmacy.from_dict(obj["virtual_pharmacy"]) if obj.get("virtual_pharmacy") is not None else None,
128
- "patient": Patient.from_dict(obj["patient"]) if obj.get("patient") is not None else None,
129
- "prescriber": Prescriber.from_dict(obj["prescriber"]) if obj.get("prescriber") is not None else None,
130
- "medication": Medication.from_dict(obj["medication"]) if obj.get("medication") is not None else None,
131
- "ndc": obj.get("ndc"),
132
- "days_supply": obj.get("days_supply"),
133
- "quantity_value": obj.get("quantity_value"),
134
- "number_of_fills": obj.get("number_of_fills"),
135
- "sig_text": obj.get("sig_text"),
136
- "is_completed": obj.get("is_completed"),
137
- "has_running_workflow": obj.get("has_running_workflow")
138
- })
139
- return _obj
140
-
141
-
@@ -1,137 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- P2RX API
5
-
6
- API for the P2RX 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, StrictBool, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from rxfoundry.clients.swifty_api.models.code_qualifier_code import CodeQualifierCode
24
- from rxfoundry.clients.swifty_api.models.medication_program_pricing import MedicationProgramPricing
25
- from rxfoundry.clients.swifty_api.models.medication_variant import MedicationVariant
26
- from typing import Optional, Set
27
- from typing_extensions import Self
28
-
29
- class Medication(BaseModel):
30
- """
31
- Medication
32
- """ # noqa: E501
33
- uuid: Optional[StrictStr] = None
34
- drug_description: Optional[StrictStr] = None
35
- drug_strength: Optional[StrictStr] = None
36
- drug_strength_form: Optional[StrictStr] = None
37
- drug_strength_uom: Optional[StrictStr] = None
38
- is_brand: Optional[StrictBool] = None
39
- program_pricing: Optional[List[MedicationProgramPricing]] = None
40
- variants: Optional[List[MedicationVariant]] = None
41
- medication_product_codes: Optional[List[CodeQualifierCode]] = None
42
- medication_drug_database_codes: Optional[List[CodeQualifierCode]] = None
43
- __properties: ClassVar[List[str]] = ["uuid", "drug_description", "drug_strength", "drug_strength_form", "drug_strength_uom", "is_brand", "program_pricing", "variants", "medication_product_codes", "medication_drug_database_codes"]
44
-
45
- model_config = ConfigDict(
46
- populate_by_name=True,
47
- validate_assignment=True,
48
- protected_namespaces=(),
49
- )
50
-
51
-
52
- def to_str(self) -> str:
53
- """Returns the string representation of the model using alias"""
54
- return pprint.pformat(self.model_dump(by_alias=True))
55
-
56
- def to_json(self) -> str:
57
- """Returns the JSON representation of the model using alias"""
58
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
- return json.dumps(self.to_dict())
60
-
61
- @classmethod
62
- def from_json(cls, json_str: str) -> Optional[Self]:
63
- """Create an instance of Medication from a JSON string"""
64
- return cls.from_dict(json.loads(json_str))
65
-
66
- def to_dict(self) -> Dict[str, Any]:
67
- """Return the dictionary representation of the model using alias.
68
-
69
- This has the following differences from calling pydantic's
70
- `self.model_dump(by_alias=True)`:
71
-
72
- * `None` is only added to the output dict for nullable fields that
73
- were set at model initialization. Other fields with value `None`
74
- are ignored.
75
- """
76
- excluded_fields: Set[str] = set([
77
- ])
78
-
79
- _dict = self.model_dump(
80
- by_alias=True,
81
- exclude=excluded_fields,
82
- exclude_none=True,
83
- )
84
- # override the default output from pydantic by calling `to_dict()` of each item in program_pricing (list)
85
- _items = []
86
- if self.program_pricing:
87
- for _item_program_pricing in self.program_pricing:
88
- if _item_program_pricing:
89
- _items.append(_item_program_pricing.to_dict())
90
- _dict['program_pricing'] = _items
91
- # override the default output from pydantic by calling `to_dict()` of each item in variants (list)
92
- _items = []
93
- if self.variants:
94
- for _item_variants in self.variants:
95
- if _item_variants:
96
- _items.append(_item_variants.to_dict())
97
- _dict['variants'] = _items
98
- # override the default output from pydantic by calling `to_dict()` of each item in medication_product_codes (list)
99
- _items = []
100
- if self.medication_product_codes:
101
- for _item_medication_product_codes in self.medication_product_codes:
102
- if _item_medication_product_codes:
103
- _items.append(_item_medication_product_codes.to_dict())
104
- _dict['medication_product_codes'] = _items
105
- # override the default output from pydantic by calling `to_dict()` of each item in medication_drug_database_codes (list)
106
- _items = []
107
- if self.medication_drug_database_codes:
108
- for _item_medication_drug_database_codes in self.medication_drug_database_codes:
109
- if _item_medication_drug_database_codes:
110
- _items.append(_item_medication_drug_database_codes.to_dict())
111
- _dict['medication_drug_database_codes'] = _items
112
- return _dict
113
-
114
- @classmethod
115
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
116
- """Create an instance of Medication from a dict"""
117
- if obj is None:
118
- return None
119
-
120
- if not isinstance(obj, dict):
121
- return cls.model_validate(obj)
122
-
123
- _obj = cls.model_validate({
124
- "uuid": obj.get("uuid"),
125
- "drug_description": obj.get("drug_description"),
126
- "drug_strength": obj.get("drug_strength"),
127
- "drug_strength_form": obj.get("drug_strength_form"),
128
- "drug_strength_uom": obj.get("drug_strength_uom"),
129
- "is_brand": obj.get("is_brand"),
130
- "program_pricing": [MedicationProgramPricing.from_dict(_item) for _item in obj["program_pricing"]] if obj.get("program_pricing") is not None else None,
131
- "variants": [MedicationVariant.from_dict(_item) for _item in obj["variants"]] if obj.get("variants") is not None else None,
132
- "medication_product_codes": [CodeQualifierCode.from_dict(_item) for _item in obj["medication_product_codes"]] if obj.get("medication_product_codes") is not None else None,
133
- "medication_drug_database_codes": [CodeQualifierCode.from_dict(_item) for _item in obj["medication_drug_database_codes"]] if obj.get("medication_drug_database_codes") is not None else None
134
- })
135
- return _obj
136
-
137
-
@@ -1,99 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- P2RX API
5
-
6
- API for the P2RX 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, StrictFloat, StrictInt
23
- from typing import Any, ClassVar, Dict, List, Optional, Union
24
- from rxfoundry.clients.swifty_api.models.pricing_program import PricingProgram
25
- from typing import Optional, Set
26
- from typing_extensions import Self
27
-
28
- class MedicationProgramPricing(BaseModel):
29
- """
30
- MedicationProgramPricing
31
- """ # noqa: E501
32
- pricing_program: Optional[PricingProgram] = None
33
- from_date: Optional[date] = None
34
- to_date: Optional[date] = None
35
- ingredient_cost: Optional[Union[StrictFloat, StrictInt]] = None
36
- __properties: ClassVar[List[str]] = ["pricing_program", "from_date", "to_date", "ingredient_cost"]
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 MedicationProgramPricing 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 pricing_program
78
- if self.pricing_program:
79
- _dict['pricing_program'] = self.pricing_program.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 MedicationProgramPricing 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
- "pricing_program": PricingProgram.from_dict(obj["pricing_program"]) if obj.get("pricing_program") is not None else None,
93
- "from_date": obj.get("from_date"),
94
- "to_date": obj.get("to_date"),
95
- "ingredient_cost": obj.get("ingredient_cost")
96
- })
97
- return _obj
98
-
99
-
@@ -1,96 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- P2RX API
5
-
6
- API for the P2RX 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, 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 MedicationVariant(BaseModel):
27
- """
28
- MedicationVariant
29
- """ # noqa: E501
30
- uuid: Optional[StrictStr] = None
31
- ndc: Optional[StrictStr] = None
32
- manufacturer: Optional[StrictStr] = None
33
- packaging: Optional[StrictStr] = None
34
- is_brand: Optional[StrictBool] = None
35
- __properties: ClassVar[List[str]] = ["uuid", "ndc", "manufacturer", "packaging", "is_brand"]
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 MedicationVariant 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 MedicationVariant 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
- "ndc": obj.get("ndc"),
90
- "manufacturer": obj.get("manufacturer"),
91
- "packaging": obj.get("packaging"),
92
- "is_brand": obj.get("is_brand")
93
- })
94
- return _obj
95
-
96
-
@@ -1,128 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- P2RX API
5
-
6
- API for the P2RX 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 rxfoundry.clients.swifty_api.models.address import Address
24
- from rxfoundry.clients.swifty_api.models.code import Code
25
- from rxfoundry.clients.swifty_api.models.patient_external_identifier import PatientExternalIdentifier
26
- from typing import Optional, Set
27
- from typing_extensions import Self
28
-
29
- class Patient(BaseModel):
30
- """
31
- Patient
32
- """ # noqa: E501
33
- uuid: Optional[StrictStr] = None
34
- last_name: Optional[StrictStr] = None
35
- first_name: Optional[StrictStr] = None
36
- middle_name: Optional[StrictStr] = None
37
- suffix: Optional[StrictStr] = None
38
- prefix: Optional[StrictStr] = None
39
- gender: Optional[Code] = None
40
- date_of_birth: Optional[StrictStr] = None
41
- home_address: Optional[Address] = None
42
- primary_phone: Optional[StrictStr] = None
43
- alternate_phone: Optional[StrictStr] = None
44
- email: Optional[StrictStr] = None
45
- external_references: Optional[List[PatientExternalIdentifier]] = None
46
- __properties: ClassVar[List[str]] = ["uuid", "last_name", "first_name", "middle_name", "suffix", "prefix", "gender", "date_of_birth", "home_address", "primary_phone", "alternate_phone", "email", "external_references"]
47
-
48
- model_config = ConfigDict(
49
- populate_by_name=True,
50
- validate_assignment=True,
51
- protected_namespaces=(),
52
- )
53
-
54
-
55
- def to_str(self) -> str:
56
- """Returns the string representation of the model using alias"""
57
- return pprint.pformat(self.model_dump(by_alias=True))
58
-
59
- def to_json(self) -> str:
60
- """Returns the JSON representation of the model using alias"""
61
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
62
- return json.dumps(self.to_dict())
63
-
64
- @classmethod
65
- def from_json(cls, json_str: str) -> Optional[Self]:
66
- """Create an instance of Patient from a JSON string"""
67
- return cls.from_dict(json.loads(json_str))
68
-
69
- def to_dict(self) -> Dict[str, Any]:
70
- """Return the dictionary representation of the model using alias.
71
-
72
- This has the following differences from calling pydantic's
73
- `self.model_dump(by_alias=True)`:
74
-
75
- * `None` is only added to the output dict for nullable fields that
76
- were set at model initialization. Other fields with value `None`
77
- are ignored.
78
- """
79
- excluded_fields: Set[str] = set([
80
- ])
81
-
82
- _dict = self.model_dump(
83
- by_alias=True,
84
- exclude=excluded_fields,
85
- exclude_none=True,
86
- )
87
- # override the default output from pydantic by calling `to_dict()` of gender
88
- if self.gender:
89
- _dict['gender'] = self.gender.to_dict()
90
- # override the default output from pydantic by calling `to_dict()` of home_address
91
- if self.home_address:
92
- _dict['home_address'] = self.home_address.to_dict()
93
- # override the default output from pydantic by calling `to_dict()` of each item in external_references (list)
94
- _items = []
95
- if self.external_references:
96
- for _item_external_references in self.external_references:
97
- if _item_external_references:
98
- _items.append(_item_external_references.to_dict())
99
- _dict['external_references'] = _items
100
- return _dict
101
-
102
- @classmethod
103
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
104
- """Create an instance of Patient from a dict"""
105
- if obj is None:
106
- return None
107
-
108
- if not isinstance(obj, dict):
109
- return cls.model_validate(obj)
110
-
111
- _obj = cls.model_validate({
112
- "uuid": obj.get("uuid"),
113
- "last_name": obj.get("last_name"),
114
- "first_name": obj.get("first_name"),
115
- "middle_name": obj.get("middle_name"),
116
- "suffix": obj.get("suffix"),
117
- "prefix": obj.get("prefix"),
118
- "gender": Code.from_dict(obj["gender"]) if obj.get("gender") is not None else None,
119
- "date_of_birth": obj.get("date_of_birth"),
120
- "home_address": Address.from_dict(obj["home_address"]) if obj.get("home_address") is not None else None,
121
- "primary_phone": obj.get("primary_phone"),
122
- "alternate_phone": obj.get("alternate_phone"),
123
- "email": obj.get("email"),
124
- "external_references": [PatientExternalIdentifier.from_dict(_item) for _item in obj["external_references"]] if obj.get("external_references") is not None else None
125
- })
126
- return _obj
127
-
128
-