Generate FHIR search parameters from text

POST/lang2fhir/search
RequiresBearerauthentication

Body parameters

textstringrequired
Returns  

Response fields

resource_typestringoptional
AllergyIntoleranceAppointmentCarePlanCareTeamConditionCoverageDeviceDiagnosticReportDocumentReferenceEncounterGoalImmunizationLocationMedicationMedicationRequestObservationOrganizationPatientPlanDefinitionPractitionerPractitionerRoleProcedureProvenanceQuestionnaireQuestionnaireResponseRelatedPersonScheduleServiceRequestSlotSpecimen
search_paramsstringoptional
POSTRequest
# 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 POST "https://experiment.app.pheno.ml/lang2fhir/search" \
  -H "Authorization: Bearer $PHENOML_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Appointments between March 2-9, 2025"
}'
200 OKExample Response
{
  "resource_type": "Appointment",
  "search_params": "date=ge2025-03-02&date=le2025-03-09"
}