Integrated Templates
Integrated templates allow systems to integrate with Tiep in a quick and simple manner, maintaining your data schemas.
Overview
Integrated templates consist on the normalization and description of your system's schemas, adapting it to our own format to make use of our models in a quick way.
To map our reports to your schemas, whe define Payload Fields: small objects that describe what each field in your payload requires.
These fields can be AI-generated from your custom_json, or manually defined by you on creation:
Payload Field
-
internal_id(string, required) Your stable id for the field (e.g.,patient_age). -
name(string, required) Short display name (e.g., “Age”). -
description(string, required) Plain-language description for what the field requires (e.g., “What is the patient’s age?”). -
type(string, required; default:STRING) One of:TRANSCRIPT,DATETIME,STRING,NUMBER,BOOLEAN,LIST,CONCEPT,CONCEPT_LIST. -
default(string | number | boolean | null, optional) Default value if not provided. -
required(boolean, optional; default: false) Whether this field must be present. -
mapping(string, optional) JMESPath expression pointing to where this lives inside yourcustom_json. Example:patient.ageorencounters[0].diagnoses[*].code. -
choices(array of coded choice objects(Concepts), optional — only forCONCEPT/CONCEPT_LIST) The allowed coded values. These objects must include:-
internal_code(string) Your code value (e.g.,0). -
display(string) Human-readable label (e.g., “Essential (primary) hypertension”).
-
Management
The management of you Integrated Templates is done through our API with these 3 routes:
Create
POST /integrated-templates
Use this to create a new integrated template.
- Auth:
X-API-Key: <your facility API key> - Body:
custom_json(the JSON schema you want to receive in each consultation)fields(optional, if missing, AI will define them) list of correctly mapped field schemas.medical_specialtyfrom our defined specialties (limits which doctors can use it; default:GENERAL)internal_idyour own id to identify this template.titlethe title you give this template
Returns: the created template info.
Update
POST /integrated-templates/{internal_id}
- Identify the template to update through the
internal_idgiven - Auth:
X-API-Key: <your facility API key> - Body:
custom_json(the JSON schema you want to receive in each consultation)fields(optional, if missing, AI will define them) list of correctly mapped field schemas.medical_specialtyfrom our defined specialties (limits which doctors can use it; default:GENERAL)internal_id(optional) new internal_id you want to give this template.titlethe title you give this template
Returns: the updated template info
Delete
DELETE /integrated-templates/{internal_id}
Removes a template.
Returns: success status.
In order to correctly map and produce an accurate Integrated Template we recommend you let our AI create the fields to ensure correct mapping on creation, then you verify each field is correctly defined and update it to suit your needs.
API Use
To use an Integrated Template and receive your own Custom JSON, your facility settings must be set to have a Custom Payload Type.
To specify which Integrated Template you want to receive in a consultation. Define in the payload of /transcribe-and-generate either your internal_id set in your template through template_id, or Tiep's own report id through report_template_id
Sample request:
- Via your own set
internal_id:
curl -X POST "https://api.tiep.ai/v1/transcribe-and-generate" \
-H "X-API-Key: $FACILITY_API_KEY" \
-F "audio=@/path/to/consultation.wav" \
-F 'payload={
"doctor_id": "1",
"template_id": "$internal_id" ,
};type=application/json'
- Via our own created
report_template_id:
curl -X POST "https://api.tiep.ai/v1/transcribe-and-generate" \
-H "X-API-Key: $FACILITY_API_KEY" \
-F "audio=@/path/to/consultation.wav" \
-F 'payload={
"doctor_id": "1",
"report_template_id": 1000002 ,
};type=application/json'