soulmv-sync-link-python-sdk 1.0.0__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.0/LICENSE +5 -0
- soulmv_sync_link_python_sdk-1.0.0/PKG-INFO +21 -0
- soulmv_sync_link_python_sdk-1.0.0/README.md +0 -0
- soulmv_sync_link_python_sdk-1.0.0/pyproject.toml +26 -0
- soulmv_sync_link_python_sdk-1.0.0/setup.cfg +4 -0
- soulmv_sync_link_python_sdk-1.0.0/src/__init__.py +0 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv/__init__.py +0 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv/synclink/__init__.py +0 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv/synclink/api.py +40 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv/synclink/apis/patient_record.py +37 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv_sync_link_python_sdk.egg-info/PKG-INFO +21 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv_sync_link_python_sdk.egg-info/SOURCES.txt +12 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv_sync_link_python_sdk.egg-info/dependency_links.txt +1 -0
- soulmv_sync_link_python_sdk-1.0.0/src/soulmv_sync_link_python_sdk.egg-info/top_level.txt +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: soulmv-sync-link-python-sdk
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Client de comunicaçao c/ Sync Link API do Soul/MV
|
|
5
|
+
Author-email: Filipe Coelho <filipe@fmconsult.com.br>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 Seu Nome
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy...
|
|
11
|
+
|
|
12
|
+
Project-URL: Homepage, https://github.com/seuuser/minha-biblioteca
|
|
13
|
+
Project-URL: Bug Tracker, https://github.com/seuuser/minha-biblioteca/issues
|
|
14
|
+
Keywords: sdk,api,soulmv-sync-link
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Dynamic: license-file
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "soulmv-sync-link-python-sdk"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Client de comunicaçao c/ Sync Link API do Soul/MV"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = {file = "LICENSE"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Filipe Coelho", email = "filipe@fmconsult.com.br"},
|
|
14
|
+
]
|
|
15
|
+
keywords = ["sdk", "api", "soulmv-sync-link"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
dependencies = []
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
"Homepage" = "https://github.com/seuuser/minha-biblioteca"
|
|
26
|
+
"Bug Tracker" = "https://github.com/seuuser/minha-biblioteca/issues"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import os, jsonpickle
|
|
2
|
+
from http import HTTPMethod
|
|
3
|
+
|
|
4
|
+
from fmconsult.http.api import ApiBase
|
|
5
|
+
from fmconsult.utils.url import UrlUtil
|
|
6
|
+
|
|
7
|
+
class SoulMVSyncLinkApi(ApiBase):
|
|
8
|
+
|
|
9
|
+
def __init__(self):
|
|
10
|
+
try:
|
|
11
|
+
self.api_tenant_id = os.environ['soulmv.synclink.api.tenant.id']
|
|
12
|
+
self.api_user = os.environ['soulmv.synclink.api.user']
|
|
13
|
+
|
|
14
|
+
self.base_url = 'https://mv-sync-link.use77seg.com.br/synclink-ehr-service'
|
|
15
|
+
self.headers = {
|
|
16
|
+
'X-Tenant-ID': self.api_tenant_id
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
self.__login()
|
|
20
|
+
except:
|
|
21
|
+
raise
|
|
22
|
+
def __login(self):
|
|
23
|
+
try:
|
|
24
|
+
res = self.call_request(
|
|
25
|
+
http_method = HTTPMethod.POST,
|
|
26
|
+
request_url = UrlUtil().make_url(self.base_url, ['auth','login']),
|
|
27
|
+
payload = {
|
|
28
|
+
'user': self.api_user
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
res = jsonpickle.decode(res)
|
|
32
|
+
if res.get('status') == 200:
|
|
33
|
+
self.token_type = res.get('data').get('token_type')
|
|
34
|
+
self.access_token = res.get('data').get('access_token')
|
|
35
|
+
self.refresh_token = res.get('data').get('refresh_token')
|
|
36
|
+
self.headers['Authorization'] = f'{self.token_type} {self.access_token}'
|
|
37
|
+
else:
|
|
38
|
+
raise Exception(res.get('message'))
|
|
39
|
+
except:
|
|
40
|
+
raise
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: soulmv-sync-link-python-sdk
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Client de comunicaçao c/ Sync Link API do Soul/MV
|
|
5
|
+
Author-email: Filipe Coelho <filipe@fmconsult.com.br>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 Seu Nome
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy...
|
|
11
|
+
|
|
12
|
+
Project-URL: Homepage, https://github.com/seuuser/minha-biblioteca
|
|
13
|
+
Project-URL: Bug Tracker, https://github.com/seuuser/minha-biblioteca/issues
|
|
14
|
+
Keywords: sdk,api,soulmv-sync-link
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/__init__.py
|
|
5
|
+
src/soulmv/__init__.py
|
|
6
|
+
src/soulmv/synclink/__init__.py
|
|
7
|
+
src/soulmv/synclink/api.py
|
|
8
|
+
src/soulmv/synclink/apis/patient_record.py
|
|
9
|
+
src/soulmv_sync_link_python_sdk.egg-info/PKG-INFO
|
|
10
|
+
src/soulmv_sync_link_python_sdk.egg-info/SOURCES.txt
|
|
11
|
+
src/soulmv_sync_link_python_sdk.egg-info/dependency_links.txt
|
|
12
|
+
src/soulmv_sync_link_python_sdk.egg-info/top_level.txt
|
soulmv_sync_link_python_sdk-1.0.0/src/soulmv_sync_link_python_sdk.egg-info/dependency_links.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|