soulmv-sync-link-python-sdk 1.0.2__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.
Files changed (16) hide show
  1. {soulmv_sync_link_python_sdk-1.0.2/src/soulmv_sync_link_python_sdk.egg-info → soulmv_sync_link_python_sdk-1.0.3}/PKG-INFO +1 -1
  2. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/pyproject.toml +1 -1
  3. soulmv_sync_link_python_sdk-1.0.3/src/soulmv/synclink/apis/patient_record.py +54 -0
  4. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3/src/soulmv_sync_link_python_sdk.egg-info}/PKG-INFO +1 -1
  5. soulmv_sync_link_python_sdk-1.0.2/src/soulmv/synclink/apis/patient_record.py +0 -37
  6. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/LICENSE +0 -0
  7. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/README.md +0 -0
  8. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/setup.cfg +0 -0
  9. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/__init__.py +0 -0
  10. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/__init__.py +0 -0
  11. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/synclink/__init__.py +0 -0
  12. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/synclink/api.py +0 -0
  13. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv/synclink/apis/__init__.py +0 -0
  14. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv_sync_link_python_sdk.egg-info/SOURCES.txt +0 -0
  15. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv_sync_link_python_sdk.egg-info/dependency_links.txt +0 -0
  16. {soulmv_sync_link_python_sdk-1.0.2 → soulmv_sync_link_python_sdk-1.0.3}/src/soulmv_sync_link_python_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soulmv-sync-link-python-sdk
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Client de comunicaçao c/ Sync Link API do Soul/MV
5
5
  Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "soulmv-sync-link-python-sdk"
7
- version = "1.0.2"
7
+ version = "1.0.3"
8
8
  description = "Client de comunicaçao c/ Sync Link API do Soul/MV"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soulmv-sync-link-python-sdk
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Client de comunicaçao c/ Sync Link API do Soul/MV
5
5
  Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
6
  License: MIT License
@@ -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.endpoint_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.endpoint_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