En el objeto Assistance destacan los siguientes atributos:
Eventos/Notificaciones/Webhooks
Todos los eventos de Assistance llevan el Id de la asistencia como carga útil.
Recuperar asistencia
https://developers.gadaca.com/#api-Assistances-AssistanceGet
Obtener información de la asistencia por su ID.
Respuesta de ejemplo:
HTTP/1.1 200 OK
{
"data": {
"object": "Assistance",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"access_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"appointment_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"assistance_class_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"attention_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"attention_to": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"attention_tries": 1,
"derivation_appointment_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"derivation_comments": "Praesent volutpat urna vel ultrices ultrices.",
"derivation_priority_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"derivation_step_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"derivation_type_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"domain_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"incidence_type_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"leave_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"medic_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"patient_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"previous_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"priority_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"requester_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"service_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"speciality_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"service_order": 1,
"status_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"type_id": "1rawon45qlekj78m9gzy0avdbr96m37n",
"assistanceable": {
"data": {
"object": "Consultation",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"anamnesis": "Lorem ipsum dolor...",
"diagnosis": "Praesent volutpat urna vel ultrices ultrices.",
"observations": "Sit amet, consecuentum...",
"reason": "Lorem ipsum dolor..."
}
},
"assistance_class": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "consultation",
"extra": null
"name": "Consulta médica",
"path": "/assistance-class/consultation"
}
},
"domain": {
"data": {
"object": "Domain",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "homedoctor-mobile-app",
"common_name": "Homedoctor",
"name": "Homedoctor Mobile App"
}
},
"patient": {
"data": {
"object": "User",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"name": "Popilio",
"surname1": "Lenas"
}
},
"priority": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "p3",
"extra": null
"name": "Media",
"path": "/assistance-priority/p3"
}
},
"status": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "waiting",
"extra": {
"color": "#000000"
},
"name": "En espera",
"path": "/reception-status/waiting"
}
},
"type": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "at-video",
"extra": null
"name": "Videoconsulta",
"path": "/assistance-type/at-video"
}
}
}
}
Recuperar archivos de la asistencia.
Para recuperar los archivos de la asistencia, se deberá indicar en el parámetro “include” del servicio de recuperación de asistencia, los valores "files" o "attachments"(alias de files)
Respuesta de ejemplo de un objeto tipo file:
[
{
"object": "File",
"id": "xnowp9n75xz4r0dmvd6g8ma3kebjvyyb",
"name": "My File Name",
"real_name": "file.pdf",
"category": "uploads",
"path": "uploads/file.pdf",
"extension": "pdf",
"mime_type": "application/pdf",
"size": "81237310",
"url": "https://api.gadaca.com/files/xnowp9n75xz4r0dmvd6g8ma3kebjvyyb/download-binaries",
"created_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"real_id": 1,
"deleted_at": null
}
]
Descargar archivo de la asistencia.
https://developers.gadaca.com/#api-Assistances-AssistanceFileDownloadGet
Descarga un archivo de la asistencia usando el id de la asistencia y el id del archivo
Ejemplo de respuesta:
HTTP/1.1 200 OK
{
"data": {
"object": "File",
"id": "xnowp9n75xz4r0dmvd6g8ma3kebjvyyb",
"name": "My File Name",
"real_name": "file.pdf",
"category": "uploads",
"path": "uploads/file.pdf",
"extension": "pdf",
"mime_type": "application/pdf",
"size": "81237310",
"binaries": "aHR0cHM6Ly93d3cubWlsYW51bmNpb3MuY29tL2NpdHJvZW4tZGUtc2VndW5kYS1tYW5vL2NpdHJvZW4tYzUtMi0wLWhkaS0xNjBjdi1taWxsZW5pdW0tdG91cmVyLTIyNDU0MjgxNi5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9jaGV2cm9sZXQtZGUtc2VndW5kYS1tYW5vL2NoZXZyb2xldC1jcnV6ZS1zdy0yLTB2Y2RpLWVjby1sdHotYXV0LTIzNjMxMTQwMS5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9yZW5hdWx0LWRlLXNlZ3VuZGEtbWFuby9yZW5hdWx0LWxhZ3VuYS1nLXRvdXItZHluLXRvbXRvbS0yLTAtZW4tZGNpLTE1MC1lY28yLTIzNjA4Mzc1My5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9yZW5hdWx0LWRlLXNlZ3VuZGEtbWFuby9yZW5hdWx0LWxhZ3VuYS0yMzU2NzQwNDcuaHRt",
"url": "https://api.gadaca.com/files/xnowp9n75xz4r0dmvd6g8ma3kebjvyyb/download-binaries",
"created_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"real_id": 1,
"deleted_at": null
}
}
Recuperar autorizaciones médicas de la asistencia
Para recuperar las autorizaciones, al igual que los archivos, usaremos un "include" con valor authorizations.
Ejemplo del objeto de respuesta recibido.
[
{
"object": "MedicalAuthorization",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
//Insert Parameters
"created_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"updated_at": {
"date": "2017-06-26 21:00:02.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
}
},
{
"object": "MedicalAuthorization",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
//Insert Parameters
"created_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"updated_at": {
"date": "2017-06-26 21:00:02.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
}
}
]
Descargar autorizaciones de la asistencia.
https://developers.gadaca.com/#api-MedicalAuthorizations-MedicalAuthorizationFileDownloadGet
Descarga una autorización mética usando el id de la misma:
Ejemplo de la respuesta:
HTTP/1.1 200 OK
{
"data": {
"object": "File",
"id": "xnowp9n75xz4r0dmvd6g8ma3kebjvyyb",
"name": "My File Name",
"real_name": "file.pdf",
"category": "uploads",
"path": "uploads/file.pdf",
"extension": "pdf",
"mime_type": "application/pdf",
"size": "81237310",
"binaries": "aHR0cHM6Ly93d3cubWlsYW51bmNpb3MuY29tL2NpdHJvZW4tZGUtc2VndW5kYS1tYW5vL2NpdHJvZW4tYzUtMi0wLWhkaS0xNjBjdi1taWxsZW5pdW0tdG91cmVyLTIyNDU0MjgxNi5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9jaGV2cm9sZXQtZGUtc2VndW5kYS1tYW5vL2NoZXZyb2xldC1jcnV6ZS1zdy0yLTB2Y2RpLWVjby1sdHotYXV0LTIzNjMxMTQwMS5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9yZW5hdWx0LWRlLXNlZ3VuZGEtbWFuby9yZW5hdWx0LWxhZ3VuYS1nLXRvdXItZHluLXRvbXRvbS0yLTAtZW4tZGNpLTE1MC1lY28yLTIzNjA4Mzc1My5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9yZW5hdWx0LWRlLXNlZ3VuZGEtbWFuby9yZW5hdWx0LWxhZ3VuYS0yMzU2NzQwNDcuaHRt",
"url": "https://api.gadaca.com/files/xnowp9n75xz4r0dmvd6g8ma3kebjvyyb/download-binaries",
"created_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"real_id": 1,
"deleted_at": null
}
}
Consultar las mediciones de una asistencia
Para recuperar las mediciones, al igual que los archivos, usaremos un "include" con valor measurements.
Ejemplo del objeto de respuesta recibido.
Revisar el cuerpo de respuesta de https://developers.gadaca.com/#api-Measurements-MeasurementListGet
Descargar una medición de una asistencia(Si hubiese un adjunto)
Utilizando la url que responde el listado de mediciones. Por ejemplo.
"measure": {
"image_url": "https://api.gadaca.com/v1/file/xopxon45qlekj78m9gzy0avdbr96m37n/download-binaries",
"thumbnail_url": "https://api.gadaca.com/v1/file/xopxon45qlekj78m9gzy0avdbr96m37n/download-binaries"
}
Recuperar tratamientos(Treatments) de una asistencia
Al igual que los anteriores, se pueden recuperar usando el "include" treatments
Ejemplo de objeto Treatment
{
"object": "Treatment",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"active_ingredient_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"assistance_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"begin_at": {
"date": "2018-05-12 00:00:00.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"begin_at_year": 2018,
"begin_at_month": 5,
"begin_at_day": 12,
"description": "Lorem ipsum dolor sit amet...",
"domain_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"dosage_condition": "Si dolor",
"dosage_period": 8,
"dosage_period_unit_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"dosage_quantity": 1,
"dosage_unit_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"duration": 8,
"duration_unit_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"end_at": {
"date": "2018-10-05 00:00:00.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"end_at_year": 2018,
"end_at_month": 10,
"end_at_day": 5,
"instructions": "Lorem ipsum dolor sit amet...",
"is_alarm": 1,
"is_chronic": 0,
"is_verified": 1,
"medicine_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"name": "Lorem ipsum dolor sit amet...",
"source_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"status_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"type_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"user_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"created_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"updated_at": {
"date": "2017-06-26 21:00:02.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"active_ingredient": {
"data": {
"object": "ActiveIngredient",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "58AB",
"number": "141",
"name": "RANITIDINA"
}
},
"dosage_period_unit": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "month",
"name": "Mes"
}
},
"dosage_unit": {
"data": {
"object": "DosageUnit",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "612",
"name": "viales"
}
},
"duration_unit": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "month",
"name": "Mes"
}
},
"medicine": null,
"source": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "medic",
"name": "Médico"
}
},
"status": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "active",
"name": "Activo"
}
},
"type": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "active-ingredient",
"name": "Principio Activo"
}
}
}
Recuperar recetas de los tratamientos
Esto, se puede conseguir simplemente ampliado el "include" anterior de "treatments" añadiendo a dicho include la ruta relacional hasta las recetas, quedando el include de la siguiente forma "treatments.receipts.files"
En ese caso, se añadirá un include más al objeto "treatment" previamente descrito quedando de la siguiente forma
{
"receipts": {
"data": [
{
"object": "Receipt",
"id": "xnowp9n75xz4r0dmvd6g8ma3kebjvyyb",
"cve": "95862836D-123123-12123",
"num_receta": "10012-2",
"expired_at": {
"date": "2017-08-03 20:28:52.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"prescription_at": {
"date": "2017-07-23 20:28:52.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"receipt_book_id": "lkdue475xz4r0dmvd6g8ma3kebjvyyb",
"treatment_id": "a9234475xz4r0dmvd6g8ma3kebjvyyb",
"created_at": {
"date": "2017-07-23 20:28:52.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2017-07-23 20:28:52.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"treatment": {
"data": {
"object": "Treatment"
}
},
"files": {
"data": [
{
"object": "File",
"id": "xnowp9n75xz4r0dmvd6g8ma3kebjvyyb",
"name": "My File Name",
"real_name": "file.pdf",
"category": "uploads",
"path": "uploads/file.pdf",
"extension": "pdf",
"mime_type": "application/pdf",
"size": "81237310",
"binaries": "aHR0cHM6Ly93d3cubWlsYW51bmNpb3MuY29tL2NpdHJvZW4tZGUtc2VndW5kYS1tYW5vL2NpdHJvZW4tYzUtMi0wLWhkaS0xNjBjdi1taWxsZW5pdW0tdG91cmVyLTIyNDU0MjgxNi5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9jaGV2cm9sZXQtZGUtc2VndW5kYS1tYW5vL2NoZXZyb2xldC1jcnV6ZS1zdy0yLTB2Y2RpLWVjby1sdHotYXV0LTIzNjMxMTQwMS5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9yZW5hdWx0LWRlLXNlZ3VuZGEtbWFuby9yZW5hdWx0LWxhZ3VuYS1nLXRvdXItZHluLXRvbXRvbS0yLTAtZW4tZGNpLTE1MC1lY28yLTIzNjA4Mzc1My5odG0KCmh0dHBzOi8vd3d3Lm1pbGFudW5jaW9zLmNvbS9yZW5hdWx0LWRlLXNlZ3VuZGEtbWFuby9yZW5hdWx0LWxhZ3VuYS0yMzU2NzQwNDcuaHRt",
"url": "https://api.gadaca.com/files/xnowp9n75xz4r0dmvd6g8ma3kebjvyyb/download-binaries",
"created_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2017-08-03 21:45:01.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"real_id": 1,
"deleted_at": null
}
]
}
}
]
}
}
Recuperar informes de una asistencia
https://developers.gadaca.com/#api-Reports-ReportListGet
Se recuperará vía "include" cuando se consulta la asistencia utilizando el include "reports"
Ejemplo de respuesta listado de reports:
"data": [
{
"object": "Report",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"additional_data": "Lorem ipsum dolor sit amet...",
"assistance_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"datetime_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"datetime_at_day": 9,
"datetime_at_month": 4,
"datetime_at_year": 2017,
"domain_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"medic_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"medic_name": "Jose Luis Martínez Pérez",
"name": "Operación cirugía torácica",
"source_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"type_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"user_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"created_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"updated_at": {
"date": "2017-06-26 21:00:02.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"source": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "medic",
"name": "Médico"
}
},
"type": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "surgery",
"name": "Intervención"
}
}
},
{
"object": "Report",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"additional_data": "Lorem ipsum dolor sit amet...",
"assistance_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"datetime_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"datetime_at_day": 9,
"datetime_at_month": 4,
"datetime_at_year": 2017,
"domain_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"medic_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"medic_name": "Jose Luis Martínez Pérez",
"name": "Operación cirugía torácica",
"source_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"type_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"user_id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"created_at": {
"date": "2017-04-09 12:02:46.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"updated_at": {
"date": "2017-06-26 21:00:02.000000",
"timezone_type": 3,
"timezone": "Europe/Madrid"
},
"source": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "automatic",
"name": "Automático/Autogenerado"
}
},
"type": {
"data": {
"object": "Category",
"id": "xopxon45qlekj78m9gzy0avdbr96m37n",
"code": "consultation",
"name": "Consulta"
}
}
}
]
Otros elementos de interés
Hay otros includes que pueden ser interesantes:
"speciality": https://developers.gadaca.com/#api-MedicalSpecialities-MedicalSpecialityGet
Se puede consultar el listado completo de includes https://developers.gadaca.com/#api-Assistances-AssistanceGet
Una asistencia se puede encontrar en los siguientes estados: