El examen de tomografía se utiliza para laudar una tomografía. Puede agregarse a un pedido existente o crearse junto con el pedido.
Al crear la tomografía es necesario especificar el tipo de tomografía entre los tipos disponibles.
Tipos de tomografía (tomography_type):
- 0 => Tomografía del Maxilar.
- 1 => Tomografía de la Mandíbula.
- 2 => Tomografía de hasta 6 dientes.
- 3 => Tomografía de hasta 4 dientes.
- 4 => Tomografía de hasta 2 dientes.
- 5 => ATM de 2 segmentos.
- 6 => ATM de 3 segmentos.
- 30 => Otro.
Crear pedido con tomografía
Ejemplo con CURLcurl -X POST https://max.cfaz.net/api/v1/requests \
-d "access_token=0cd675768fev8dab81fe1c1297d56b09" \
-d "request[clinic_id]=19" \
-d "request[request_status_id]=53" \
-d "request[date]=2021-06-11T16:30" \
-d "request[dentist_datum][name]=João das Couves" \
-d "request[patient_datum][name]=Maria das Couves" \
-d "request[patient_datum][gender]=true" \
-d "request[patient_datum][birthdate]=1995-01-01" \
-d "request[tomographies_attributes][1][segment_area]=0" \
-d "request[tomographies_attributes][1][tomography_type]=2"Ejemplo con la Gem RestClient
RestClient.post "https://max.cfaz.net/api/v1/requests",
{ request:
{ clinic_id: 19,
request_status_id: 53,
date: "2021-06-11T16:30",
dentist_datum: { name: "João das Couves" },
patient_datum: { name: "Maria das Couves", gender: true, birthdate: "1995-01-01"},
tomographies_attributes: [
{ "1": { tomography_type: "2" }}
],
}
},
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"Los archivos también pueden agregarse a una tomografía durante la creación del pedido.
Ejemplo con Curlcurl -X POST 'https://max.cfaz.net/api/v1/requests' \ -H 'Content-Type: multipart/form-data' \ -F "access_token=0cd675768fev8dab81fe1c1297d56b09" \ -F 'request[clinic_id]=4' \ -F 'request[request_status_id]=7' \ -F 'request[date]=2020-12-15T16:30' \ -F 'request[dentist_datum][name]=João das Couves' \ -F 'request[patient_datum][name]=João das Couves' \ -F 'request[patient_datum][gender]=true' \ -F 'request[patient_datum][birthdate]=1995-01-01' \ -F 'request[tomographies_attributes][0][tomography_type]=2' \ -F 'request[tomographies_attributes][0][tomography_files_attributes][0][document]=@/path/arquivo.png'
Ejemplo con la Gem RestClientRestClient.post "https://max.cfaz.net/api/v1/requests",
{ request:
{ clinic_id: 4,
request_status_id: 7,
date: "2020-12-15T16:30",
dentist_datum: { name: "João das Couves" },
patient_datum: { name: "Maria das Couves", gender: true, birthdate: "1995-01-01"},
tomographies_attributes:[{
tomography_type: 2,
tomography_files_attributes: [
{ document: File.open("/path/arquivo.pdf") }
]
}]
}
},
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"Agregar tomografía a un pedido existente
Ejemplo con CURLcurl -X PUT https://max.cfaz.net/api/v1/requests/{request_id} \
-d "access_token=0cd675768fev8dab81fe1c1297d56b09" \
-d "request[tomographies_attributes][1][tomography_type]=2" Ejemplo con la Gem RestClientRestClient.put "https://max.cfaz.net/api/v1/requests/{request_id}",
{ request: {
tomographies_attributes: [
{ "1": { tomography_type: "2" }}
],
}},
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"También se pueden agregar archivos a una tomografía existente.
Ejemplo con Curlcurl -X PUT 'https://max.cfaz.net/api/v1/requests/{request_id}' \
-H 'Content-Type: multipart/form-data' \
-F 'access_token=0cd675768fev8dab81fe1c1297d56b09' \
-F 'request[tomographies_attributes][0][id]=tomography_id' \
-F 'request[tomographies_attributes][0][tomography_files_attributes][0][document]=@/path/arquivo.png'Ejemplo con la Gem RestClientRestClient.put "https://max.cfaz.net/api/v1/requests/{request_id}",
{request: {
tomographies_attributes: [
{ id: {tomography_id},
tomography_files_attributes: [
{ document: File.open("/path/arquivo.pdf") }
]
}]
}
},
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"Agregar archivo a una tomografía:
Los archivos pueden agregarse directamente a una tomografía existente.
Ejemplo con Curlcurl -X PUT 'https://max.cfaz.net//api/v1/tomographies/{tomography_id}' \
-H 'Content-Type: multipart/form-data' \
-F 'access_token=0cd675768fev8dab81fe1c1297d56b09' \
-F 'tomography[tomography_files_attributes][0][document]=@/path/arquivo.png'Ejemplo con la Gem RestClientRestClient.put "https://max.cfaz.net/api/v1/tomographies/{tomography_id}",
{tomography_files_attributes: [
{ document: File.open("/path/arquivo.pdf") }
]
},
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"Cambiar el estado de un trazado cefalométrico
Para cambiar el estado del examen, basta informar el valor deseado en la etiqueta status. Las opciones disponibles son:
- 1 → Nuevo, color rojo
- 2 → En curso, color amarillo
- 3 → Finalizado, color verde
- 4 → En verificación, color azul
Ejemplo con CURLcurl -X PUT https://max.cfaz.net/api/v1/requests \
-d "access_token=0cd675768fev8dab81fe1c1297d56b09" \
-d "request[tomographies_attributes][1][id]=61025" \
-d "request[tomographies_attributes][1][status]=3"Ejemplo con la Gem RestClientRestClient.put "https://max.cfaz.net/api/v1/requests/{request_id}",
{ "request":
{
"tomographies_attributes":
{ "1": { "id": "61025",
"status": "3" }
}
}
}.
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"Eliminar tomografía de un pedido existente
Ejemplo con CURLcurl -X PUT https://max.cfaz.net/api/v1/requests/{request_id} \
-d "access_token=0cd675768fev8dab81fe1c1297d56b09" \
-d "request[tomographies_attributes][1][segment_area]=0" \
-d "request[tomographies_attributes][1][id]={tomography_id}" \
-d "request[tomographies_attributes][1][_destroy]=1" Ejemplo con la Gem RestClientRestClient.put "https://max.cfaz.net/api/v1/requests/{request_id}",
{request: {
id: {request.id},
reports_attributes: [
{ id: {tomography.id}, _destroy: true }
]
}
},
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"Eliminar archivos específicos de un Laudo 3D
Ejemplo con CURLcurl -X PUT https://max.cfaz.net/api/v1/requests/{request_id} \
-d "access_token=0cd675768fev8dab81fe1c1297d56b09" \
-d "request[request_status_id]=54" \
-d "request[tomographies_attributes][0][id]={tomography_id}" \
-d "request[tomographies_attributes][0][tomography_files_attributes][0][id]={tomography_file_id}" \
-d "request[tomographies_attributes][0][tomography_files_attributes][0][_destroy]=1"Ejemplo con la Gem RestClientRestClient.put "https://max.cfaz.net/api/v1/requests/{request_id}",
{request: {
request_status_id: 54,
tomographies_attributes: [
{
id: {tomography_id},
tomography_files_attributes: [
{ id: {tomography_file_id}, _destroy: true }
]
}
]
}
},
"authorization" => "Token token=0cd675768fev8dab81fe1c1297d56b09"Enviar archivos directamente al StoragePara enviar los archivos/cortes tomográficos directamente al storage, siga la siguiente documentación:
¿Le fue útil este artículo?
¡Qué bueno!
Gracias por sus comentarios
¡Sentimos mucho no haber sido de ayuda!
Gracias por sus comentarios
Comentarios enviados
Agradecemos su iniciativa, e intentaremos corregir el artículo