Registrar decisiones para varias alertas de CDSS
curl --request POST \
--url https://scribe-api.telepatia.ai/v1/cdss/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decisions": [
{
"decision": "accepted",
"id": "cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO"
},
{
"decision": "rejected",
"id": "cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg"
}
]
}
'import requests
url = "https://scribe-api.telepatia.ai/v1/cdss/decisions"
payload = { "decisions": [
{
"decision": "accepted",
"id": "cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO"
},
{
"decision": "rejected",
"id": "cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
decisions: [
{decision: 'accepted', id: 'cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO'},
{decision: 'rejected', id: 'cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg'}
]
})
};
fetch('https://scribe-api.telepatia.ai/v1/cdss/decisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scribe-api.telepatia.ai/v1/cdss/decisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'decisions' => [
[
'decision' => 'accepted',
'id' => 'cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO'
],
[
'decision' => 'rejected',
'id' => 'cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://scribe-api.telepatia.ai/v1/cdss/decisions"
payload := strings.NewReader("{\n \"decisions\": [\n {\n \"decision\": \"accepted\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO\"\n },\n {\n \"decision\": \"rejected\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scribe-api.telepatia.ai/v1/cdss/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decisions\": [\n {\n \"decision\": \"accepted\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO\"\n },\n {\n \"decision\": \"rejected\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe-api.telepatia.ai/v1/cdss/decisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"decisions\": [\n {\n \"decision\": \"accepted\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO\"\n },\n {\n \"decision\": \"rejected\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"decisions": [
{
"elementId": "IBUPROFEN",
"id": "cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO",
"status": "accepted"
}
]
}Soporte a la Decisión Clínica
Registrar decisiones para varias alertas de CDSS
Acepta o rechaza varias alertas de soporte a la decisión clínica en una sola llamada. Cada alerta se valida antes de registrar cualquier decisión, por lo que un lote que contenga una alerta inutilizable no cambia nada. Los cambios aceptados se aplican a la historia clínica de forma asíncrona.
POST
/
v1
/
cdss
/
decisions
Registrar decisiones para varias alertas de CDSS
curl --request POST \
--url https://scribe-api.telepatia.ai/v1/cdss/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decisions": [
{
"decision": "accepted",
"id": "cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO"
},
{
"decision": "rejected",
"id": "cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg"
}
]
}
'import requests
url = "https://scribe-api.telepatia.ai/v1/cdss/decisions"
payload = { "decisions": [
{
"decision": "accepted",
"id": "cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO"
},
{
"decision": "rejected",
"id": "cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
decisions: [
{decision: 'accepted', id: 'cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO'},
{decision: 'rejected', id: 'cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg'}
]
})
};
fetch('https://scribe-api.telepatia.ai/v1/cdss/decisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scribe-api.telepatia.ai/v1/cdss/decisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'decisions' => [
[
'decision' => 'accepted',
'id' => 'cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO'
],
[
'decision' => 'rejected',
'id' => 'cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://scribe-api.telepatia.ai/v1/cdss/decisions"
payload := strings.NewReader("{\n \"decisions\": [\n {\n \"decision\": \"accepted\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO\"\n },\n {\n \"decision\": \"rejected\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scribe-api.telepatia.ai/v1/cdss/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decisions\": [\n {\n \"decision\": \"accepted\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO\"\n },\n {\n \"decision\": \"rejected\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe-api.telepatia.ai/v1/cdss/decisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"decisions\": [\n {\n \"decision\": \"accepted\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO\"\n },\n {\n \"decision\": \"rejected\",\n \"id\": \"cfa_bXJkLWFiYy0xMjMfQVNQSVJJTg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"decisions": [
{
"elementId": "IBUPROFEN",
"id": "cfa_bXJkLWFiYy0xMjMfSUJVUFJPRkVO",
"status": "accepted"
}
]
}Autorizaciones
Clave API enviada como token Bearer
Cuerpo
application/json
Record decisions for several CDSS alerts in one call.
The alerts to act on. Every alert is validated before any decision is recorded.
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Respuesta
Respuesta exitosa
The decisions recorded for a batch request.
One entry per submitted alert, in the order received.
Show child attributes
Show child attributes