AI agent for DRG classification from clinical text
curl --request POST \
--url https://api.v2.healthproximate.com/api/v1/drg/agent/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"message": "<string>",
"deidentified": false
}
'import requests
url = "https://api.v2.healthproximate.com/api/v1/drg/agent/"
payload = {
"message": "<string>",
"deidentified": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>', deidentified: false})
};
fetch('https://api.v2.healthproximate.com/api/v1/drg/agent/', 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://api.v2.healthproximate.com/api/v1/drg/agent/",
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([
'message' => '<string>',
'deidentified' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.v2.healthproximate.com/api/v1/drg/agent/"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"deidentified\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.v2.healthproximate.com/api/v1/drg/agent/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"deidentified\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.v2.healthproximate.com/api/v1/drg/agent/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"deidentified\": false\n}"
response = http.request(request)
puts response.read_body{
"response": "Based on the diagnosis code B20 (HIV disease), this classifies to **DRG 977** - HIV WITH RELATED CONDITION...",
"token_usage": {
"input_tokens": 1520,
"output_tokens": 340
},
"response_time_ms": 3200
}DRG
AI agent for DRG classification from clinical text
Use an AI agent to classify hospital encounters into MS-DRG codes from natural language clinical text. The agent can extract ICD-10 codes from clinical descriptions and explain DRG assignments.
LLM cost: ~$0.01-0.05 per request (uses Claude Sonnet via AWS Bedrock).
For structured ICD-10 code input, use the /api/v1/drg/classify/ endpoint instead ($0 cost).
POST
/
api
/
v1
/
drg
/
agent
/
AI agent for DRG classification from clinical text
curl --request POST \
--url https://api.v2.healthproximate.com/api/v1/drg/agent/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"message": "<string>",
"deidentified": false
}
'import requests
url = "https://api.v2.healthproximate.com/api/v1/drg/agent/"
payload = {
"message": "<string>",
"deidentified": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>', deidentified: false})
};
fetch('https://api.v2.healthproximate.com/api/v1/drg/agent/', 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://api.v2.healthproximate.com/api/v1/drg/agent/",
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([
'message' => '<string>',
'deidentified' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.v2.healthproximate.com/api/v1/drg/agent/"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"deidentified\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.v2.healthproximate.com/api/v1/drg/agent/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"deidentified\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.v2.healthproximate.com/api/v1/drg/agent/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"deidentified\": false\n}"
response = http.request(request)
puts response.read_body{
"response": "Based on the diagnosis code B20 (HIV disease), this classifies to **DRG 977** - HIV WITH RELATED CONDITION...",
"token_usage": {
"input_tokens": 1520,
"output_tokens": 340
},
"response_time_ms": 3200
}Authorizations
api_key_authjwt_auth
API key for organization authentication. Obtain from the organization settings or API key management endpoint.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Request serializer for the DRG AI agent endpoint.
Natural language clinical text or DRG question (max 20,000 characters)
Required string length:
1 - 20000Optional MS-DRG version hint for the agent
v36- v36v37- v37v38- v38v39- v39v40- v40v43- v43
Available options:
v36, v37, v38, v39, v40, v43 Whether the input clinical text has already been de-identified

