{ "info": { "author": "Andres Vazquez", "author_email": "andres@data99.com.ar", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": "# Anexo II\nGeneraci\u00f3n para impresi\u00f3n del \"Comprobante de Atenci\u00f3n de Beneficiarios de Obras Sociales\" (Conocido como Anexo II). \nSeg\u00fan [Resolucion 487/2002](http://servicios.infoleg.gob.ar/infolegInternet/anexos/75000-79999/77280/texact.htm). \n\n```\nArt. 2\u00b0 \u2014 Los Hospitales P\u00fablicos de Gesti\u00f3n Descentralizada deber\u00e1n \n cumplimentar el \"Comprobante de Atenci\u00f3n de Beneficiarios de Obras Sociales\", \n que se agrega como Anexo II, que pasa a formar parte integrante de la presente \n Resoluci\u00f3n, con car\u00e1cter de Declaraci\u00f3n Jurada, firmado por el m\u00e9dico actuante \n o Jefe del Servicio, con sello y n\u00famero de matr\u00edcula, y el responsable \n administrativo del Hospital, con sello, cargo y aclaraci\u00f3n de firma, \n con la correspondiente suscripci\u00f3n o firma del beneficiario, \n familiar o responsable.\n```\nDocumento original usado de base [ac\u00e1](originales/Anexo-II-RESOLUCION-487-2002.gif). \n\n## Herramienta desarrollada\n\nEste instrumento toma un diccionario con datos y genera un HTML listo para imprimir, firmar y sellar. \n\n## Instalacion \n\n```\npip install anexo2\n```\n\n\n## Uso\n\n```python\nhospital = {'nombre': 'HOSPITAL SAN ROQUE', # https://www.sssalud.gob.ar/index.php?page=bus_hosp&cat=consultas\n 'codigo_hpgd': '4321323'}\n\nbeneficiario = {'apellido_y_nombres': 'Juan Perez',\n 'tipo_dni': 'DNI', # | LE | LC\n 'dni': '34100900',\n 'tipo_beneficiario': 'titular', # | no titular | adherente\n 'parentesco': 'conyuge', # hijo | otro\n 'sexo': 'M', # | F\n 'edad': 88}\natencion = {'tipo': 'consulta', # | practica | internacion\n 'especialidad': 'Va un texto al parecer largo, quizas sea del nomenclador',\n 'codigos_N_HPGD': ['AA01', 'AA02', 'AA06', 'AA07'], # no se de donde son estos c\u00f3digos\n 'fecha': {'dia': 3, 'mes': 9, 'anio': 2019},\n 'diagnostico_ingreso_cie10': {'principal': 'W020', 'otros': ['w021', 'A189']}}\nobra_social = {'codigo_rnos': '800501',\n 'nombre': 'OBRA SOCIAL ACEROS PARANA',\n 'nro_carnet_obra_social': '9134818283929101',\n 'fecha_de_emision': {'dia': 11, 'mes': 9, 'anio': 2009},\n 'fecha_de_vencimiento': {'dia': 11, 'mes': 9, 'anio': 2029}}\nempresa = {'nombre': 'Telescopios Hubble',\n 'direccion': 'Av Astron\u00f3mica s/n',\n 'ultimo_recibo_de_sueldo': {'mes': 7, 'anio': 2019},\n 'cuit': '31-91203043-8'}\n\ndata = {'dia': 3,\n 'mes': 9,\n 'anio': 2019,\n 'hospital': hospital,\n 'beneficiario': beneficiario,\n 'atencion': atencion,\n 'obra_social': obra_social,\n 'empresa': empresa\n }\n\nfrom anexo2.docs import Anexo2\nanx = Anexo2(data=data)\nsave_to = 'path.html'\nres = anx.get_html(save_path=save_to)\nif res is None:\n print('ERRORES al procesar pedido')\n for field, error in a2.errors.items():\n print(f' - {field}: {error}')\nelse:\n print(f'Procesado correctamente y grabado en {save_to}')\n```\n\n## Validaci\u00f3n de los datos\nInternamente se usa la librer\u00eda [cerberus](https://docs.python-cerberus.org/en/stable/validation-rules.html) para validar los datos. \n**Ninguno de los campos es requerido** y los que est\u00e9n ausentes no se completar\u00e1n en el html. \n\nAqu\u00ed se puede ver el esquema de validaci\u00f3n: \n\n```python\nfrom anexo2.docs import Anexo2\nanx = Anexo2(data={})\nanx.get_schema()\n```\n\n```\n{\n\t'dia': {\n\t\t'type': 'integer',\n\t\t'min': 1,\n\t\t'max': 31\n\t},\n\t'mes': {\n\t\t'type': 'integer',\n\t\t'min': 1,\n\t\t'max': 12\n\t},\n\t'anio': {\n\t\t'type': 'integer',\n\t\t'min': 2019,\n\t\t'max': 2030\n\t},\n\t'hospital': {\n\t\t'type': 'dict',\n\t\t'schema': {\n\t\t\t'nombre': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'codigo_hpgd': {\n\t\t\t\t'type': 'string'\n\t\t\t}\n\t\t}\n\t},\n\t'beneficiario': {\n\t\t'type': 'dict',\n\t\t'schema': {\n\t\t\t'apellido_y_nombres': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'tipo_dni': {\n\t\t\t\t'type': 'string',\n\t\t\t\t'allowed': ['DNI', 'LE', 'LC']\n\t\t\t},\n\t\t\t'dni': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'tipo_beneficiario': {\n\t\t\t\t'type': 'string',\n\t\t\t\t'allowed': ['titular', 'no titular', 'adherente']\n\t\t\t},\n\t\t\t'parentesco': {\n\t\t\t\t'type': 'string',\n\t\t\t\t'allowed': ['conyuge', 'hijo', 'otro']\n\t\t\t},\n\t\t\t'sexo': {\n\t\t\t\t'type': 'string',\n\t\t\t\t'allowed': ['F', 'M']\n\t\t\t},\n\t\t\t'edad': {\n\t\t\t\t'type': 'integer',\n\t\t\t\t'min': 0,\n\t\t\t\t'max': 110\n\t\t\t}\n\t\t}\n\t},\n\t'atencion': {\n\t\t'type': 'dict',\n\t\t'schema': {\n\t\t\t'tipo': {\n\t\t\t\t'type': 'string',\n\t\t\t\t'allowed': ['consulta', 'practica', 'internacion']\n\t\t\t},\n\t\t\t'especialidad': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'codigos_N_HPGD': {\n\t\t\t\t'type': 'list'\n\t\t\t},\n\t\t\t'fecha': {\n\t\t\t\t'type': 'dict',\n\t\t\t\t'schema': {\n\t\t\t\t\t'dia': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 31\n\t\t\t\t\t},\n\t\t\t\t\t'mes': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 12\n\t\t\t\t\t},\n\t\t\t\t\t'anio': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 2019,\n\t\t\t\t\t\t'max': 2030\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'diagnostico_ingreso_cie10': {\n\t\t\t\t'type': 'dict',\n\t\t\t\t'schema': {\n\t\t\t\t\t'principal': {\n\t\t\t\t\t\t'type': 'string'\n\t\t\t\t\t},\n\t\t\t\t\t'otros': {\n\t\t\t\t\t\t'type': 'list'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\t'obra_social': {\n\t\t'type': 'dict',\n\t\t'schema': {\n\t\t\t'codigo_rnos': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'nombre': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'nro_carnet_obra_social': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'fecha_de_emision': {\n\t\t\t\t'type': 'dict',\n\t\t\t\t'schema': {\n\t\t\t\t\t'dia': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 31\n\t\t\t\t\t},\n\t\t\t\t\t'mes': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 12\n\t\t\t\t\t},\n\t\t\t\t\t'anio': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1970,\n\t\t\t\t\t\t'max': 2030\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'fecha_de_vencimiento': {\n\t\t\t\t'type': 'dict',\n\t\t\t\t'schema': {\n\t\t\t\t\t'dia': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 31\n\t\t\t\t\t},\n\t\t\t\t\t'mes': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 12\n\t\t\t\t\t},\n\t\t\t\t\t'anio': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 2019,\n\t\t\t\t\t\t'max': 2030\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\t'empresa': {\n\t\t'type': 'dict',\n\t\t'schema': {\n\t\t\t'nombre': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'direccion': {\n\t\t\t\t'type': 'string'\n\t\t\t},\n\t\t\t'ultimo_recibo_de_sueldo': {\n\t\t\t\t'type': 'dict',\n\t\t\t\t'schema': {\n\t\t\t\t\t'dia': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 31\n\t\t\t\t\t},\n\t\t\t\t\t'mes': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1,\n\t\t\t\t\t\t'max': 12\n\t\t\t\t\t},\n\t\t\t\t\t'anio': {\n\t\t\t\t\t\t'type': 'integer',\n\t\t\t\t\t\t'min': 1970,\n\t\t\t\t\t\t'max': 2030\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'cuit': {\n\t\t\t\t'type': 'string'\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cluster311/Anexo2", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "anexo2", "package_url": "https://pypi.org/project/anexo2/", "platform": "", "project_url": "https://pypi.org/project/anexo2/", "project_urls": { "Homepage": "https://github.com/cluster311/Anexo2" }, "release_url": "https://pypi.org/project/anexo2/0.101/", "requires_dist": [ "cerberus (>=1.3)" ], "requires_python": ">=3.6", "summary": "Generacion de HTML para impresion de Anexo II", "version": "0.101" }, "last_serial": 5764654, "releases": { "0.101": [ { "comment_text": "", "digests": { "md5": "8775e89290e1a0e0d4b3e8b2c2e83143", "sha256": "de93f5bf2b102ac530eca9009459dbbb07781395efa2589c31837ca6de10efaa" }, "downloads": -1, "filename": "anexo2-0.101-py3-none-any.whl", "has_sig": false, "md5_digest": "8775e89290e1a0e0d4b3e8b2c2e83143", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 5341, "upload_time": "2019-08-31T16:13:20", "url": "https://files.pythonhosted.org/packages/6f/51/e3290bdb399fddf2a9c2e5dfea57927155d6698427b7e4fc0391124ace4b/anexo2-0.101-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8775e89290e1a0e0d4b3e8b2c2e83143", "sha256": "de93f5bf2b102ac530eca9009459dbbb07781395efa2589c31837ca6de10efaa" }, "downloads": -1, "filename": "anexo2-0.101-py3-none-any.whl", "has_sig": false, "md5_digest": "8775e89290e1a0e0d4b3e8b2c2e83143", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 5341, "upload_time": "2019-08-31T16:13:20", "url": "https://files.pythonhosted.org/packages/6f/51/e3290bdb399fddf2a9c2e5dfea57927155d6698427b7e4fc0391124ace4b/anexo2-0.101-py3-none-any.whl" } ] }