List all summary templates

GET/fhir2summary/templates

Retrieves all summary templates for the authenticated user

RequiresBearerauthentication
Returns  

Templates retrieved successfully

Response fields

successbooleanoptional
templatesobject[]optional
idstring (uuid)optional
namestringoptional
descriptionstringoptional
templatestringoptional

Template with {{resource.field}} placeholders

target_resourcesstring[]optional

List of FHIR resource types/profiles

modestringoptional

Template mode (stored value)

metadataobjectoptional
created_atstring (date-time)optional
updated_atstring (date-time)optional
GETRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X GET "https://experiment.app.pheno.ml/fhir2summary/templates" \
  -H "Authorization: Bearer $PHENOML_TOKEN"
200 OKExample Response
{
  "success": true,
  "templates": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Discharge Summary",
      "template": "Patient <<Patient.name[0].text>>, age <<Patient.birthDate|age>>, was admitted on <<Encounter[0].period.start>> with <<Condition[0].code.coding[0].display>>.",
      "target_resources": [
        "Patient",
        "Condition",
        "MedicationRequest"
      ],
      "mode": "narrative",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ]
}