Anexo II
Generación para impresión del "Comprobante de Atención de Beneficiarios de Obras Sociales" (Conocido como Anexo II).
Según Resolucion 487/2002.
Art. 2° — Los Hospitales Públicos de Gestión Descentralizada deberán
cumplimentar el "Comprobante de Atención de Beneficiarios de Obras Sociales",
que se agrega como Anexo II, que pasa a formar parte integrante de la presente
Resolución, con carácter de Declaración Jurada, firmado por el médico actuante
o Jefe del Servicio, con sello y número de matrícula, y el responsable
administrativo del Hospital, con sello, cargo y aclaración de firma,
con la correspondiente suscripción o firma del beneficiario,
familiar o responsable.
Documento original usado de base acá.
Herramienta desarrollada
Este instrumento toma un diccionario con datos y genera un HTML listo para imprimir, firmar y sellar.
Muestra
Instalacion
pip install anexo2
Uso
hospital = {'nombre': 'HOSPITAL SAN ROQUE', # https://www.sssalud.gob.ar/index.php?page=bus_hosp&cat=consultas
'codigo_hpgd': '4321323'}
beneficiario = {'apellido_y_nombres': 'Juan Perez',
'tipo_dni': 'DNI', # | LE | LC
'dni': '34100900',
'tipo_beneficiario': 'titular', # | no titular | adherente
'parentesco': 'conyuge', # hijo | otro
'sexo': 'M', # | F
'edad': 88}
atencion = {'tipo': ['consulta', 'práctica', 'internación'],
'especialidad': 'Va un texto al parecer largo, quizas sea del nomenclador',
'codigos_N_HPGD': ['AA01', 'AA02', 'AA06', 'AA07'], # no se de donde son estos códigos
'fecha': {'dia': 3, 'mes': 9, 'anio': 2019},
'diagnostico_ingreso_cie10': {'principal': 'W020', 'otros': ['w021', 'A189']}}
obra_social = {'codigo_rnos': '800501',
'nombre': 'OBRA SOCIAL ACEROS PARANA',
'nro_carnet_obra_social': '9134818283929101',
'fecha_de_emision': {'dia': 11, 'mes': 9, 'anio': 2009},
'fecha_de_vencimiento': {'dia': 11, 'mes': 9, 'anio': 2029}}
empresa = {'nombre': 'Telescopios Hubble',
'direccion': 'Av Astronómica s/n',
'ultimo_recibo_de_sueldo': {'mes': 7, 'anio': 2019},
'cuit': '31-91203043-8'}
data = {'dia': 3,
'mes': 9,
'anio': 2019,
'hospital': hospital,
'beneficiario': beneficiario,
'atencion': atencion,
'obra_social': obra_social,
'empresa': empresa
}
from anexo2.docs import Anexo2
anx = Anexo2(data=data)
save_to = 'path.html'
res = anx.get_html(save_path=save_to)
if res is None:
print('ERRORES al procesar pedido')
for field, error in anx.errors.items():
print(f' - {field}: {error}')
else:
print(f'Procesado correctamente y grabado en {save_to}')
Validación de los datos
Internamente se usa la librería cerberus para validar los datos.
Ninguno de los campos es requerido y los que estén ausentes no se completarán en el html.
Aquí se puede ver el esquema de validación:
from anexo2.docs import Anexo2
anx = Anexo2(data={})
anx.get_schema()
{
'dia': {
'type': 'integer',
'min': 1,
'max': 31
},
'mes': {
'type': 'integer',
'min': 1,
'max': 12
},
'anio': {
'type': 'integer',
'min': 2019,
'max': 2030
},
'hospital': {
'type': 'dict',
'schema': {
'nombre': {
'type': 'string'
},
'codigo_hpgd': {
'type': 'string'
}
}
},
'beneficiario': {
'type': 'dict',
'schema': {
'apellido_y_nombres': {
'type': 'string'
},
'tipo_dni': {
'type': 'string',
'allowed': ['DNI', 'LE', 'LC']
},
'dni': {
'type': 'string'
},
'tipo_beneficiario': {
'type': 'string',
'allowed': ['titular', 'no titular', 'adherente']
},
'parentesco': {
'type': 'string',
'allowed': ['conyuge', 'hijo', 'otro']
},
'sexo': {
'type': 'string',
'allowed': ['F', 'M']
},
'edad': {
'type': 'integer',
'min': 0,
'max': 110
}
}
},
'atencion': {
'type': 'dict',
'schema': {
'tipo': {
'type': 'string',
'allowed': ['consulta', 'práctica', 'internación']
},
'especialidad': {
'type': 'string'
},
'codigos_N_HPGD': {
'type': 'list'
},
'fecha': {
'type': 'dict',
'schema': {
'dia': {
'type': 'integer',
'min': 1,
'max': 31
},
'mes': {
'type': 'integer',
'min': 1,
'max': 12
},
'anio': {
'type': 'integer',
'min': 2019,
'max': 2030
}
}
},
'diagnostico_ingreso_cie10': {
'type': 'dict',
'schema': {
'principal': {
'type': 'string'
},
'otros': {
'type': 'list'
}
}
}
}
},
'obra_social': {
'type': 'dict',
'schema': {
'codigo_rnos': {
'type': 'string'
},
'nombre': {
'type': 'string'
},
'nro_carnet_obra_social': {
'type': 'string'
},
'fecha_de_emision': {
'type': 'dict',
'schema': {
'dia': {
'type': 'integer',
'min': 1,
'max': 31
},
'mes': {
'type': 'integer',
'min': 1,
'max': 12
},
'anio': {
'type': 'integer',
'min': 1970,
'max': 2030
}
}
},
'fecha_de_vencimiento': {
'type': 'dict',
'schema': {
'dia': {
'type': 'integer',
'min': 1,
'max': 31
},
'mes': {
'type': 'integer',
'min': 1,
'max': 12
},
'anio': {
'type': 'integer',
'min': 2019,
'max': 2030
}
}
}
}
},
'empresa': {
'type': 'dict',
'schema': {
'nombre': {
'type': 'string'
},
'direccion': {
'type': 'string'
},
'ultimo_recibo_de_sueldo': {
'type': 'dict',
'schema': {
'dia': {
'type': 'integer',
'min': 1,
'max': 31
},
'mes': {
'type': 'integer',
'min': 1,
'max': 12
},
'anio': {
'type': 'integer',
'min': 1970,
'max': 2030
}
}
},
'cuit': {
'type': 'string'
}
}
}
}
Metadata
Release files for anexo2 1.0.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anexo2-1.0.21.tar.gz | 193.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anexo2-1.0.21-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 388.5 kB
Release files / anexo2-1.0.21.tar.gz
| Download URL | anexo2-1.0.21.tar.gz |
|---|---|
| Size | 193.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a827b983fed6c9f425a202f0a34c03d41a873a4d9a5637d5d0ccc4d6d33478af
|
|
BLAKE2b-256 checksum How to use checksums |
81f61a614eb65da585186b22ca42e4d971eb7fd3e695842acf84d4adefee2a19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.0
|
Release files / anexo2-1.0.21-py3-none-any.whl
| Download URL | anexo2-1.0.21-py3-none-any.whl |
|---|---|
| Size | 195.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab375a50b53f9ebf36730afeb2e38105a81b5ddf5b2a5a35b5a2d4e61f7d13dd
|
|
BLAKE2b-256 checksum How to use checksums |
9171364baef31a37bf53e60280d66ea9513bd1d8c758bb54a40e0af6e7928c0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.0
|