Analyze patient cohorts
/tools/cohortUses LLM to extract search concepts from natural language and builds patient cohorts with inclusion/exclusion criteria
Header parameters
X-Phenoml-On-Behalf-OfstringoptionalOptional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity. Must be in the format: Patient/{uuid} or Practitioner/{uuid}
X-Phenoml-Fhir-ProviderstringoptionalOptional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}. Multiple FHIR provider integrations can be provided as comma-separated values.
Body parameters
textstringrequiredNatural language text describing the patient cohort criteria
providerstring (uuid)requiredFHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum)
Successfully analyzed cohort and retrieved patient list
Response fields
successbooleanoptionalWhether the cohort analysis was successful
messagestringoptionalStatus message with details about the analysis
patientIdsstring[]optionalArray of patient IDs that match the cohort criteria
patientCountintegeroptionalTotal number of patients in the cohort
queriesobject[]optionalIndividual search concepts that were identified and executed
resource_typestringoptionalThe FHIR resource type identified for this concept
search_paramsstringoptionalFHIR search parameters for this concept
conceptstringoptionalDescription of what this search represents
excludebooleanoptionalWhether this is an exclusion criteria