soulmv-sync-link-python-sdk 1.0.1__tar.gz → 1.0.3__tar.gz
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.
- {soulmv_sync_link_python_sdk-1.0.1/src/soulmv_sync_link_python_sdk.egg-info → soulmv_sync_link_python_sdk-1.0.3}/PKG-INFO +1 -1
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/pyproject.toml +1 -1
- soulmv_sync_link_python_sdk-1.0.3/src/soulmv/synclink/apis/patient_record.py +54 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3/src/soulmv_sync_link_python_sdk.egg-info}/PKG-INFO +1 -1
- soulmv_sync_link_python_sdk-1.0.1/src/soulmv/synclink/apis/patient_record.py +0 -37
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/LICENSE +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/README.md +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/setup.cfg +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/__init__.py +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/__init__.py +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/synclink/__init__.py +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/synclink/api.py +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/synclink/apis/__init__.py +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv_sync_link_python_sdk.egg-info/SOURCES.txt +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv_sync_link_python_sdk.egg-info/dependency_links.txt +0 -0
- {soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv_sync_link_python_sdk.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import logging, jsonpickle, json
|
|
2
|
+
from http import HTTPMethod
|
|
3
|
+
|
|
4
|
+
from fmconsult.utils.url import UrlUtil
|
|
5
|
+
|
|
6
|
+
from soulmv.synclink.api import SoulMVSyncLinkApi
|
|
7
|
+
|
|
8
|
+
class PatientRecordApi(SoulMVSyncLinkApi):
|
|
9
|
+
def __init__(self):
|
|
10
|
+
super().__init__()
|
|
11
|
+
self.endpoint_url = UrlUtil().make_url(self.base_url, ['api', 'v1', 'PatientRecord'])
|
|
12
|
+
|
|
13
|
+
def searchByCPF(self, cpf_number):
|
|
14
|
+
try:
|
|
15
|
+
request_url = UrlUtil().make_url(self.endpoint_url, ['search'])
|
|
16
|
+
payload = { 'cpf': cpf_number }
|
|
17
|
+
|
|
18
|
+
res = self.call_request(HTTPMethod.POST, request_url, None, payload=payload)
|
|
19
|
+
res = jsonpickle.decode(res)
|
|
20
|
+
|
|
21
|
+
return res
|
|
22
|
+
except:
|
|
23
|
+
raise
|
|
24
|
+
|
|
25
|
+
def searchByCNS(self, cns_number):
|
|
26
|
+
try:
|
|
27
|
+
request_url = UrlUtil().make_url(self.endpoint_url, ['search'])
|
|
28
|
+
payload = { 'cns': cns_number }
|
|
29
|
+
|
|
30
|
+
res = self.call_request(HTTPMethod.POST, request_url, None, payload=payload)
|
|
31
|
+
res = jsonpickle.decode(res)
|
|
32
|
+
|
|
33
|
+
return res
|
|
34
|
+
except:
|
|
35
|
+
raise
|
|
36
|
+
|
|
37
|
+
def documentStore(self, payload):
|
|
38
|
+
"""
|
|
39
|
+
POST /api/v1/PatientRecord/document-store
|
|
40
|
+
Envia documento (ex.: PDF em base64) para o prontuario do paciente.
|
|
41
|
+
"""
|
|
42
|
+
try:
|
|
43
|
+
request_url = UrlUtil().make_url(self.endpoint_url, ['document-store'])
|
|
44
|
+
res = self.call_request(
|
|
45
|
+
HTTPMethod.POST,
|
|
46
|
+
request_url,
|
|
47
|
+
None,
|
|
48
|
+
payload=payload,
|
|
49
|
+
request_timeout=120,
|
|
50
|
+
)
|
|
51
|
+
res = jsonpickle.decode(res)
|
|
52
|
+
return res
|
|
53
|
+
except:
|
|
54
|
+
raise
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import logging, jsonpickle, json
|
|
2
|
-
from http import HTTPMethod
|
|
3
|
-
|
|
4
|
-
from fmconsult.utils.url import UrlUtil
|
|
5
|
-
|
|
6
|
-
from soulmv.synclink.api import SoulMVSyncLinkApi
|
|
7
|
-
|
|
8
|
-
class PatientRecordApi(SoulMVSyncLinkApi):
|
|
9
|
-
def __init__(self):
|
|
10
|
-
super().__init__()
|
|
11
|
-
self.endpoint_url = UrlUtil().make_url(self.base_url, ['api', 'v1', 'PatientRecord'])
|
|
12
|
-
|
|
13
|
-
def searchByCPF(self, cpf_number):
|
|
14
|
-
try:
|
|
15
|
-
self.endpoint_url = UrlUtil().make_url(self.base_url, ['search'])
|
|
16
|
-
|
|
17
|
-
payload = { 'cpf': cpf_number }
|
|
18
|
-
|
|
19
|
-
res = self.call_request(HTTPMethod.POST, self.endpoint_url, None, payload=payload)
|
|
20
|
-
res = jsonpickle.decode(res)
|
|
21
|
-
|
|
22
|
-
return res
|
|
23
|
-
except:
|
|
24
|
-
raise
|
|
25
|
-
|
|
26
|
-
def searchByCNS(self, cns_number):
|
|
27
|
-
try:
|
|
28
|
-
self.endpoint_url = UrlUtil().make_url(self.base_url, ['search'])
|
|
29
|
-
|
|
30
|
-
payload = { 'cns': cns_number }
|
|
31
|
-
|
|
32
|
-
res = self.call_request(HTTPMethod.POST, self.endpoint_url, None, payload=payload)
|
|
33
|
-
res = jsonpickle.decode(res)
|
|
34
|
-
|
|
35
|
-
return res
|
|
36
|
-
except:
|
|
37
|
-
raise
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{soulmv_sync_link_python_sdk-1.0.1 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/synclink/api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|