{"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with secondary Merkel cell carcinoma?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a secondary Merkel cell carcinoma diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a secondary Merkel cell carcinoma diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have secondary Merkel cell carcinoma recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with supernumerary teeth?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a supernumerary teeth diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a supernumerary teeth diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have supernumerary teeth recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with complete loss of teeth due to caries, class III?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a complete loss of teeth due to caries, class III diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a complete loss of teeth due to caries, class III diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have complete loss of teeth due to caries, class III recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with partial loss of teeth due to other specified cause, class II?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a partial loss of teeth due to other specified cause, class II diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a partial loss of teeth due to other specified cause, class II diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have partial loss of teeth due to other specified cause, class II recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with malignant neoplasm of ethmoidal sinus?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a malignant neoplasm of ethmoidal sinus diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a malignant neoplasm of ethmoidal sinus diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have malignant neoplasm of ethmoidal sinus recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with diffuse large B-cell lymphoma, lymph nodes of multiple sites?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have diffuse large B-cell lymphoma, lymph nodes of multiple sites recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with malignant neoplasm of upper lobe, bronchus or lung?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a malignant neoplasm of upper lobe, bronchus or lung diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a malignant neoplasm of upper lobe, bronchus or lung diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have malignant neoplasm of upper lobe, bronchus or lung recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with atrophy of salivary gland?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a atrophy of salivary gland diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a atrophy of salivary gland diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have atrophy of salivary gland recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with chronic sialoadenitis?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a chronic sialoadenitis diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a chronic sialoadenitis diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have chronic sialoadenitis recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with lupus erythematosus?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a lupus erythematosus diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a lupus erythematosus diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have lupus erythematosus recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with malignant neoplasm of connective and soft tissue of head, face and neck?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a malignant neoplasm of connective and soft tissue of head, face and neck diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a malignant neoplasm of connective and soft tissue of head, face and neck diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have malignant neoplasm of connective and soft tissue of head, face and neck recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with other specified malignant neoplasm of skin of upper limb, including shoulder?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a other specified malignant neoplasm of skin of upper limb, including shoulder diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a other specified malignant neoplasm of skin of upper limb, including shoulder diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have other specified malignant neoplasm of skin of upper limb, including shoulder recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with partial loss of teeth due to periodontal diseases, class IV?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a partial loss of teeth due to periodontal diseases, class IV diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a partial loss of teeth due to periodontal diseases, class IV diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have partial loss of teeth due to periodontal diseases, class IV recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with acute recurrent sialoadenitis?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a acute recurrent sialoadenitis diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a acute recurrent sialoadenitis diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have acute recurrent sialoadenitis recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with maxillary fracture, right side, initial encounter for closed fracture?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a maxillary fracture, right side, initial encounter for closed fracture diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a maxillary fracture, right side, initial encounter for closed fracture diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have maxillary fracture, right side, initial encounter for closed fracture recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with other specified types of non-Hodgkin lymphoma, unspecified site?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a other specified types of non-Hodgkin lymphoma, unspecified site diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a other specified types of non-Hodgkin lymphoma, unspecified site diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have other specified types of non-Hodgkin lymphoma, unspecified site recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with fracture of ramus of right mandible, subsequent encounter for fracture with routine healing?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have fracture of ramus of right mandible, subsequent encounter for fracture with routine healing recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with fracture of alveolus of right mandible, initial encounter for closed fracture?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a fracture of alveolus of right mandible, initial encounter for closed fracture diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a fracture of alveolus of right mandible, initial encounter for closed fracture diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have fracture of alveolus of right mandible, initial encounter for closed fracture recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with encounter for screening for respiratory disorder NEC?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a encounter for screening for respiratory disorder NEC diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a encounter for screening for respiratory disorder NEC diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have encounter for screening for respiratory disorder NEC recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with carcinoma in situ of floor of mouth?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a carcinoma in situ of floor of mouth diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a carcinoma in situ of floor of mouth diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have carcinoma in situ of floor of mouth recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with carcinoma in situ of skin of other and unspecified parts of face?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a carcinoma in situ of skin of other and unspecified parts of face diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a carcinoma in situ of skin of other and unspecified parts of face diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have carcinoma in situ of skin of other and unspecified parts of face recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with fracture of symphysis of mandible, initial encounter for open fracture?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a fracture of symphysis of mandible, initial encounter for open fracture diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a fracture of symphysis of mandible, initial encounter for open fracture diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have fracture of symphysis of mandible, initial encounter for open fracture recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with malignant neoplasm of endometrium?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a malignant neoplasm of endometrium diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a malignant neoplasm of endometrium diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have malignant neoplasm of endometrium recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with carcinoma in situ of skin of lip?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a carcinoma in situ of skin of lip diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a carcinoma in situ of skin of lip diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have carcinoma in situ of skin of lip recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with malignant neoplasm of left lacrimal gland and duct?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a malignant neoplasm of left lacrimal gland and duct diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a malignant neoplasm of left lacrimal gland and duct diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have malignant neoplasm of left lacrimal gland and duct recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with carcinoma in situ of skin, unspecified?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a carcinoma in situ of skin, unspecified diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a carcinoma in situ of skin, unspecified diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have carcinoma in situ of skin, unspecified recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with partial loss of teeth due to trauma, class III?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a partial loss of teeth due to trauma, class III diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a partial loss of teeth due to trauma, class III diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have partial loss of teeth due to trauma, class III recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with aggressive periodontitis, generalized, slight?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a aggressive periodontitis, generalized, slight diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a aggressive periodontitis, generalized, slight diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have aggressive periodontitis, generalized, slight recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with benign neoplasm of prostate?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a benign neoplasm of prostate diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a benign neoplasm of prostate diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have benign neoplasm of prostate recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with malignant neoplasm of posterior wall of hypopharynx?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a malignant neoplasm of posterior wall of hypopharynx diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a malignant neoplasm of posterior wall of hypopharynx diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have malignant neoplasm of posterior wall of hypopharynx recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with complete loss of teeth, unspecified cause, class IV?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a complete loss of teeth, unspecified cause, class IV diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a complete loss of teeth, unspecified cause, class IV diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have complete loss of teeth, unspecified cause, class IV recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with hemangioma of intracranial structures?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a hemangioma of intracranial structures diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a hemangioma of intracranial structures diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have hemangioma of intracranial structures recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with history of undergoing in utero procedure while a fetus?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a history of undergoing in utero procedure while a fetus diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a history of undergoing in utero procedure while a fetus diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have history of undergoing in utero procedure while a fetus recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with gingival recession, generalized?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a gingival recession, generalized diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a gingival recession, generalized diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have gingival recession, generalized recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with posteruptive color changes of dental hard tissues?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a posteruptive color changes of dental hard tissues diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a posteruptive color changes of dental hard tissues diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have posteruptive color changes of dental hard tissues recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with benign neoplasm of other parts of oropharynx?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a benign neoplasm of other parts of oropharynx diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a benign neoplasm of other parts of oropharynx diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have benign neoplasm of other parts of oropharynx recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with localised slight aggressive periodontitis?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a localised slight aggressive periodontitis diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a localised slight aggressive periodontitis diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have localised slight aggressive periodontitis recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with encounter for routine child health examination with abnormal findings?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a encounter for routine child health examination with abnormal findings diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a encounter for routine child health examination with abnormal findings diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have encounter for routine child health examination with abnormal findings recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with chronic myelomonocytic leukemia not having achieved remission?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a chronic myelomonocytic leukemia not having achieved remission diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a chronic myelomonocytic leukemia not having achieved remission diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have chronic myelomonocytic leukemia not having achieved remission recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with gingival recession, localized?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a gingival recession, localized diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a gingival recession, localized diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have gingival recession, localized recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with waldenstr\u00f6m macroglobulinemia?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a waldenstr\u00f6m macroglobulinemia diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a waldenstr\u00f6m macroglobulinemia diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have waldenstr\u00f6m macroglobulinemia recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with cheek and lip biting?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a cheek and lip biting diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a cheek and lip biting diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have cheek and lip biting recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with neoplasm of uncertain behavior of connective and other soft tissue?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a neoplasm of uncertain behavior of connective and other soft tissue diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a neoplasm of uncertain behavior of connective and other soft tissue diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have neoplasm of uncertain behavior of connective and other soft tissue recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with other malignant neuroendocrine tumors?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a other malignant neuroendocrine tumors diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a other malignant neuroendocrine tumors diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have other malignant neuroendocrine tumors recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with merkel cell carcinoma of unspecified part of face?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a merkel cell carcinoma of unspecified part of face diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a merkel cell carcinoma of unspecified part of face diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have merkel cell carcinoma of unspecified part of face recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with basal cell carcinoma of skin of other parts of face?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a basal cell carcinoma of skin of other parts of face diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a basal cell carcinoma of skin of other parts of face diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have basal cell carcinoma of skin of other parts of face recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with horizontal displacement of fully erupted tooth or teeth?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a horizontal displacement of fully erupted tooth or teeth diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a horizontal displacement of fully erupted tooth or teeth diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have horizontal displacement of fully erupted tooth or teeth recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with maxillary fracture, unspecified side, initial encounter for open fracture?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a maxillary fracture, unspecified side, initial encounter for open fracture diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a maxillary fracture, unspecified side, initial encounter for open fracture diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have maxillary fracture, unspecified side, initial encounter for open fracture recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with carcinoma in situ of gingiva and edentulous alveolar ridge?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a carcinoma in situ of gingiva and edentulous alveolar ridge diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a carcinoma in situ of gingiva and edentulous alveolar ridge diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have carcinoma in situ of gingiva and edentulous alveolar ridge recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with localized gingival recession, minimal?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a localized gingival recession, minimal diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a localized gingival recession, minimal diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have localized gingival recession, minimal recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with benign neoplasm of larynx?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a benign neoplasm of larynx diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a benign neoplasm of larynx diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have benign neoplasm of larynx recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with encounter for other general examination?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a encounter for other general examination diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a encounter for other general examination diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have encounter for other general examination recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with other benign neoplasm of skin of other parts of face?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a other benign neoplasm of skin of other parts of face diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a other benign neoplasm of skin of other parts of face diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have other benign neoplasm of skin of other parts of face recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "How many of my patients have been diagnosed with fracture of subcondylar process of right mandible?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "population_health_analyst", "question": "What is the total number of distinct patients with a fracture of subcondylar process of right mandible diagnosis in our records?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "hospital_ceo", "question": "How many patients in our system have a fracture of subcondylar process of right mandible diagnosis on file?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t1_count_patients_with_condition", "tier": 1, "persona": "physician", "question": "Can you tell me the count of patients who have fracture of subcondylar process of right mandible recorded in their chart?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "Which patients currently have an active prescription for telmisartan 80 MG Oral Tablet [Micardis]?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "physician", "question": "Give me the list of patients who are currently on telmisartan 80 MG Oral Tablet [Micardis].", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "nurse", "question": "Who are the patients with an active order for telmisartan 80 MG Oral Tablet [Micardis] right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "List every patient with a currently active telmisartan 80 MG Oral Tablet [Micardis] prescription.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "Which patients currently have an active prescription for irbesartan 75 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "physician", "question": "Give me the list of patients who are currently on irbesartan 75 MG Oral Tablet.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "nurse", "question": "Who are the patients with an active order for irbesartan 75 MG Oral Tablet right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "List every patient with a currently active irbesartan 75 MG Oral Tablet prescription.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "Which patients currently have an active prescription for 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "physician", "question": "Give me the list of patients who are currently on 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex].", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "nurse", "question": "Who are the patients with an active order for 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "List every patient with a currently active 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] prescription.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "Which patients currently have an active prescription for hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "physician", "question": "Give me the list of patients who are currently on hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar].", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "nurse", "question": "Who are the patients with an active order for hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "List every patient with a currently active hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] prescription.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "Which patients currently have an active prescription for telmisartan 40 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "physician", "question": "Give me the list of patients who are currently on telmisartan 40 MG Oral Tablet.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "nurse", "question": "Who are the patients with an active order for telmisartan 40 MG Oral Tablet right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_on_medication", "tier": 1, "persona": "pharmacist", "question": "List every patient with a currently active telmisartan 40 MG Oral Tablet prescription.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT DISTINCT patient_id\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND status = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "active"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a alveolus - open reduction, may include stabilization of teeth?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed alveolus - open reduction, may include stabilization of teeth procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed alveolus - open reduction, may include stabilization of teeth in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a alveolus - open reduction, may include stabilization of teeth done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a treatment of root canal obstruction; non-surgical access?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed treatment of root canal obstruction; non-surgical access procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed treatment of root canal obstruction; non-surgical access in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a treatment of root canal obstruction; non-surgical access done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a repair of aortic valve?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed repair of aortic valve procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed repair of aortic valve in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a repair of aortic valve done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a fixed partial denture repair necessitated by restorative material failure?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed fixed partial denture repair necessitated by restorative material failure procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed fixed partial denture repair necessitated by restorative material failure in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a fixed partial denture repair necessitated by restorative material failure done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a onlay resinbased composite three surfaces?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed onlay resinbased composite three surfaces procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed onlay resinbased composite three surfaces in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a onlay resinbased composite three surfaces done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a endodontic endosseous implant?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed endodontic endosseous implant procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed endodontic endosseous implant in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a endodontic endosseous implant done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a joint reconstruction?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed joint reconstruction procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed joint reconstruction in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a joint reconstruction done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a stress breaker?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed stress breaker procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed stress breaker in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a stress breaker done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a genetic test for susceptibility to diseases - specimen analysis?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed genetic test for susceptibility to diseases - specimen analysis procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed genetic test for susceptibility to diseases - specimen analysis in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a genetic test for susceptibility to diseases - specimen analysis done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a d6973?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed d6973 procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed d6973 in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a d6973 done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a treatment changed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed treatment changed procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed treatment changed in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a treatment changed done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a transfusion of plasma?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed transfusion of plasma procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed transfusion of plasma in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a transfusion of plasma done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a replace all teeth and acrylic on cast metal framework maxillary?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed replace all teeth and acrylic on cast metal framework maxillary procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed replace all teeth and acrylic on cast metal framework maxillary in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a replace all teeth and acrylic on cast metal framework maxillary done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a post removal?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed post removal procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed post removal in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a post removal done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a extra-oral posterior dental radiographic image?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed extra-oral posterior dental radiographic image procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed extra-oral posterior dental radiographic image in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a extra-oral posterior dental radiographic image done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a adjust maxillofacial prosthetic appliance, by report?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed adjust maxillofacial prosthetic appliance, by report procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed adjust maxillofacial prosthetic appliance, by report in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a adjust maxillofacial prosthetic appliance, by report done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a palatal lift prosthesis, definitive?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed palatal lift prosthesis, definitive procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed palatal lift prosthesis, definitive in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a palatal lift prosthesis, definitive done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a fixed appliance therapy?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed fixed appliance therapy procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed fixed appliance therapy in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a fixed appliance therapy done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a semi-precision attachment - placement?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed semi-precision attachment - placement procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed semi-precision attachment - placement in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a semi-precision attachment - placement done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a sialodochoplasty?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed sialodochoplasty procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed sialodochoplasty in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a sialodochoplasty done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Which patients have completed a d1201?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "finance_reviewer", "question": "List all patients with a completed d1201 procedure on file, for billing reconciliation.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "outpatient_clerk", "question": "Who are the patients that have a completed d1201 in their record?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "t1_list_patients_with_procedure", "tier": 1, "persona": "physician", "question": "Give me every patient who's had a d1201 done.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"status\",\n \"value\": \"completed\"\n }\n ],\n \"aggregation\": {\n \"type\": \"list_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT DISTINCT patient_id\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND status = 'completed'", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "status", "value": "completed"}], "aggregation": {"type": "list_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active secondary Merkel cell carcinoma that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active secondary Merkel cell carcinoma diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have secondary Merkel cell carcinoma marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose secondary Merkel cell carcinoma is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active supernumerary teeth that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active supernumerary teeth diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have supernumerary teeth marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose supernumerary teeth is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active complete loss of teeth due to caries, class III that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active complete loss of teeth due to caries, class III diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have complete loss of teeth due to caries, class III marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose complete loss of teeth due to caries, class III is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active partial loss of teeth due to other specified cause, class II that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active partial loss of teeth due to other specified cause, class II diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have partial loss of teeth due to other specified cause, class II marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose partial loss of teeth due to other specified cause, class II is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active malignant neoplasm of ethmoidal sinus that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active malignant neoplasm of ethmoidal sinus diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have malignant neoplasm of ethmoidal sinus marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose malignant neoplasm of ethmoidal sinus is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active diffuse large B-cell lymphoma, lymph nodes of multiple sites that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have diffuse large B-cell lymphoma, lymph nodes of multiple sites marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose diffuse large B-cell lymphoma, lymph nodes of multiple sites is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active malignant neoplasm of upper lobe, bronchus or lung that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active malignant neoplasm of upper lobe, bronchus or lung diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have malignant neoplasm of upper lobe, bronchus or lung marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose malignant neoplasm of upper lobe, bronchus or lung is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active atrophy of salivary gland that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active atrophy of salivary gland diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have atrophy of salivary gland marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose atrophy of salivary gland is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active chronic sialoadenitis that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active chronic sialoadenitis diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have chronic sialoadenitis marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose chronic sialoadenitis is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active lupus erythematosus that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active lupus erythematosus diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have lupus erythematosus marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose lupus erythematosus is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active malignant neoplasm of connective and soft tissue of head, face and neck that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active malignant neoplasm of connective and soft tissue of head, face and neck diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have malignant neoplasm of connective and soft tissue of head, face and neck marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose malignant neoplasm of connective and soft tissue of head, face and neck is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active other specified malignant neoplasm of skin of upper limb, including shoulder that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active other specified malignant neoplasm of skin of upper limb, including shoulder diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have other specified malignant neoplasm of skin of upper limb, including shoulder marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose other specified malignant neoplasm of skin of upper limb, including shoulder is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active partial loss of teeth due to periodontal diseases, class IV that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active partial loss of teeth due to periodontal diseases, class IV diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have partial loss of teeth due to periodontal diseases, class IV marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose partial loss of teeth due to periodontal diseases, class IV is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active acute recurrent sialoadenitis that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active acute recurrent sialoadenitis diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have acute recurrent sialoadenitis marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose acute recurrent sialoadenitis is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active maxillary fracture, right side, initial encounter for closed fracture that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active maxillary fracture, right side, initial encounter for closed fracture diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have maxillary fracture, right side, initial encounter for closed fracture marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose maxillary fracture, right side, initial encounter for closed fracture is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active other specified types of non-Hodgkin lymphoma, unspecified site that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active other specified types of non-Hodgkin lymphoma, unspecified site diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have other specified types of non-Hodgkin lymphoma, unspecified site marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose other specified types of non-Hodgkin lymphoma, unspecified site is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active fracture of ramus of right mandible, subsequent encounter for fracture with routine healing that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have fracture of ramus of right mandible, subsequent encounter for fracture with routine healing marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose fracture of ramus of right mandible, subsequent encounter for fracture with routine healing is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active fracture of alveolus of right mandible, initial encounter for closed fracture that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active fracture of alveolus of right mandible, initial encounter for closed fracture diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have fracture of alveolus of right mandible, initial encounter for closed fracture marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose fracture of alveolus of right mandible, initial encounter for closed fracture is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active encounter for screening for respiratory disorder NEC that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active encounter for screening for respiratory disorder NEC diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have encounter for screening for respiratory disorder NEC marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose encounter for screening for respiratory disorder NEC is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active carcinoma in situ of floor of mouth that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active carcinoma in situ of floor of mouth diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have carcinoma in situ of floor of mouth marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose carcinoma in situ of floor of mouth is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active carcinoma in situ of skin of other and unspecified parts of face that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active carcinoma in situ of skin of other and unspecified parts of face diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have carcinoma in situ of skin of other and unspecified parts of face marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose carcinoma in situ of skin of other and unspecified parts of face is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active fracture of symphysis of mandible, initial encounter for open fracture that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active fracture of symphysis of mandible, initial encounter for open fracture diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have fracture of symphysis of mandible, initial encounter for open fracture marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose fracture of symphysis of mandible, initial encounter for open fracture is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active malignant neoplasm of endometrium that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active malignant neoplasm of endometrium diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have malignant neoplasm of endometrium marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose malignant neoplasm of endometrium is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active carcinoma in situ of skin of lip that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active carcinoma in situ of skin of lip diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have carcinoma in situ of skin of lip marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose carcinoma in situ of skin of lip is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active malignant neoplasm of left lacrimal gland and duct that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active malignant neoplasm of left lacrimal gland and duct diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have malignant neoplasm of left lacrimal gland and duct marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose malignant neoplasm of left lacrimal gland and duct is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active carcinoma in situ of skin, unspecified that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active carcinoma in situ of skin, unspecified diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have carcinoma in situ of skin, unspecified marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose carcinoma in situ of skin, unspecified is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active partial loss of teeth due to trauma, class III that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active partial loss of teeth due to trauma, class III diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have partial loss of teeth due to trauma, class III marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose partial loss of teeth due to trauma, class III is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active aggressive periodontitis, generalized, slight that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active aggressive periodontitis, generalized, slight diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have aggressive periodontitis, generalized, slight marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose aggressive periodontitis, generalized, slight is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active benign neoplasm of prostate that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active benign neoplasm of prostate diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have benign neoplasm of prostate marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose benign neoplasm of prostate is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active malignant neoplasm of posterior wall of hypopharynx that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active malignant neoplasm of posterior wall of hypopharynx diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have malignant neoplasm of posterior wall of hypopharynx marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose malignant neoplasm of posterior wall of hypopharynx is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active complete loss of teeth, unspecified cause, class IV that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active complete loss of teeth, unspecified cause, class IV diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have complete loss of teeth, unspecified cause, class IV marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose complete loss of teeth, unspecified cause, class IV is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active hemangioma of intracranial structures that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active hemangioma of intracranial structures diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have hemangioma of intracranial structures marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose hemangioma of intracranial structures is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active history of undergoing in utero procedure while a fetus that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active history of undergoing in utero procedure while a fetus diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have history of undergoing in utero procedure while a fetus marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose history of undergoing in utero procedure while a fetus is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active gingival recession, generalized that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active gingival recession, generalized diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have gingival recession, generalized marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose gingival recession, generalized is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active posteruptive color changes of dental hard tissues that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active posteruptive color changes of dental hard tissues diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have posteruptive color changes of dental hard tissues marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose posteruptive color changes of dental hard tissues is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active benign neoplasm of other parts of oropharynx that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active benign neoplasm of other parts of oropharynx diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have benign neoplasm of other parts of oropharynx marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose benign neoplasm of other parts of oropharynx is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active localised slight aggressive periodontitis that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active localised slight aggressive periodontitis diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have localised slight aggressive periodontitis marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose localised slight aggressive periodontitis is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active encounter for routine child health examination with abnormal findings that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active encounter for routine child health examination with abnormal findings diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have encounter for routine child health examination with abnormal findings marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose encounter for routine child health examination with abnormal findings is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active chronic myelomonocytic leukemia not having achieved remission that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active chronic myelomonocytic leukemia not having achieved remission diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have chronic myelomonocytic leukemia not having achieved remission marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose chronic myelomonocytic leukemia not having achieved remission is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active gingival recession, localized that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active gingival recession, localized diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have gingival recession, localized marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose gingival recession, localized is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active waldenstr\u00f6m macroglobulinemia that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active waldenstr\u00f6m macroglobulinemia diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have waldenstr\u00f6m macroglobulinemia marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose waldenstr\u00f6m macroglobulinemia is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active cheek and lip biting that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active cheek and lip biting diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have cheek and lip biting marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose cheek and lip biting is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active neoplasm of uncertain behavior of connective and other soft tissue that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active neoplasm of uncertain behavior of connective and other soft tissue diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have neoplasm of uncertain behavior of connective and other soft tissue marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose neoplasm of uncertain behavior of connective and other soft tissue is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active other malignant neuroendocrine tumors that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active other malignant neuroendocrine tumors diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have other malignant neuroendocrine tumors marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose other malignant neuroendocrine tumors is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active merkel cell carcinoma of unspecified part of face that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active merkel cell carcinoma of unspecified part of face diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have merkel cell carcinoma of unspecified part of face marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose merkel cell carcinoma of unspecified part of face is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active basal cell carcinoma of skin of other parts of face that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active basal cell carcinoma of skin of other parts of face diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have basal cell carcinoma of skin of other parts of face marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose basal cell carcinoma of skin of other parts of face is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active horizontal displacement of fully erupted tooth or teeth that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active horizontal displacement of fully erupted tooth or teeth diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have horizontal displacement of fully erupted tooth or teeth marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose horizontal displacement of fully erupted tooth or teeth is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active maxillary fracture, unspecified side, initial encounter for open fracture that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active maxillary fracture, unspecified side, initial encounter for open fracture diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have maxillary fracture, unspecified side, initial encounter for open fracture marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose maxillary fracture, unspecified side, initial encounter for open fracture is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active carcinoma in situ of gingiva and edentulous alveolar ridge that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active carcinoma in situ of gingiva and edentulous alveolar ridge diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have carcinoma in situ of gingiva and edentulous alveolar ridge marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose carcinoma in situ of gingiva and edentulous alveolar ridge is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active localized gingival recession, minimal that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active localized gingival recession, minimal diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have localized gingival recession, minimal marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose localized gingival recession, minimal is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active benign neoplasm of larynx that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active benign neoplasm of larynx diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have benign neoplasm of larynx marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose benign neoplasm of larynx is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active encounter for other general examination that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active encounter for other general examination diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have encounter for other general examination marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose encounter for other general examination is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active other benign neoplasm of skin of other parts of face that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active other benign neoplasm of skin of other parts of face diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have other benign neoplasm of skin of other parts of face marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose other benign neoplasm of skin of other parts of face is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "How many patients currently have active fracture of subcondylar process of right mandible that hasn't resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What's the count of patients with an active fracture of subcondylar process of right mandible diagnosis right now?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "nurse", "question": "How many patients on our list have fracture of subcondylar process of right mandible marked as still active?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_active_condition_count", "tier": 2, "persona": "physician", "question": "Give me the number of patients whose fracture of subcondylar process of right mandible is currently active.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"status\",\n \"field\": \"clinicalStatus\",\n \"value\": \"active\"\n }\n ],\n \"aggregation\": {\n \"type\": \"count_distinct_patient\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(DISTINCT patient_id) AS patient_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND clinicalStatus = 'active'", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "status", "field": "clinicalStatus", "value": "active"}], "aggregation": {"type": "count_distinct_patient", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many secondary Merkel cell carcinoma diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of secondary Merkel cell carcinoma cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the secondary Merkel cell carcinoma diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many secondary Merkel cell carcinoma diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many supernumerary teeth diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of supernumerary teeth cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the supernumerary teeth diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many supernumerary teeth diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many complete loss of teeth due to caries, class III diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of complete loss of teeth due to caries, class III cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the complete loss of teeth due to caries, class III diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many complete loss of teeth due to caries, class III diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many partial loss of teeth due to other specified cause, class II diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of partial loss of teeth due to other specified cause, class II cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the partial loss of teeth due to other specified cause, class II diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many partial loss of teeth due to other specified cause, class II diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many malignant neoplasm of ethmoidal sinus diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of malignant neoplasm of ethmoidal sinus cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the malignant neoplasm of ethmoidal sinus diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many malignant neoplasm of ethmoidal sinus diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of diffuse large B-cell lymphoma, lymph nodes of multiple sites cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many malignant neoplasm of upper lobe, bronchus or lung diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of malignant neoplasm of upper lobe, bronchus or lung cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the malignant neoplasm of upper lobe, bronchus or lung diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many malignant neoplasm of upper lobe, bronchus or lung diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many atrophy of salivary gland diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of atrophy of salivary gland cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the atrophy of salivary gland diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many atrophy of salivary gland diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many chronic sialoadenitis diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of chronic sialoadenitis cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the chronic sialoadenitis diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many chronic sialoadenitis diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many lupus erythematosus diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of lupus erythematosus cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the lupus erythematosus diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many lupus erythematosus diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many malignant neoplasm of connective and soft tissue of head, face and neck diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of malignant neoplasm of connective and soft tissue of head, face and neck cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the malignant neoplasm of connective and soft tissue of head, face and neck diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many malignant neoplasm of connective and soft tissue of head, face and neck diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many other specified malignant neoplasm of skin of upper limb, including shoulder diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of other specified malignant neoplasm of skin of upper limb, including shoulder cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the other specified malignant neoplasm of skin of upper limb, including shoulder diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many other specified malignant neoplasm of skin of upper limb, including shoulder diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many partial loss of teeth due to periodontal diseases, class IV diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of partial loss of teeth due to periodontal diseases, class IV cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the partial loss of teeth due to periodontal diseases, class IV diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many partial loss of teeth due to periodontal diseases, class IV diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many acute recurrent sialoadenitis diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of acute recurrent sialoadenitis cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the acute recurrent sialoadenitis diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many acute recurrent sialoadenitis diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many maxillary fracture, right side, initial encounter for closed fracture diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of maxillary fracture, right side, initial encounter for closed fracture cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the maxillary fracture, right side, initial encounter for closed fracture diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many maxillary fracture, right side, initial encounter for closed fracture diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many other specified types of non-Hodgkin lymphoma, unspecified site diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of other specified types of non-Hodgkin lymphoma, unspecified site cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the other specified types of non-Hodgkin lymphoma, unspecified site diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many other specified types of non-Hodgkin lymphoma, unspecified site diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of fracture of ramus of right mandible, subsequent encounter for fracture with routine healing cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many fracture of alveolus of right mandible, initial encounter for closed fracture diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of fracture of alveolus of right mandible, initial encounter for closed fracture cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the fracture of alveolus of right mandible, initial encounter for closed fracture diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many fracture of alveolus of right mandible, initial encounter for closed fracture diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many encounter for screening for respiratory disorder NEC diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of encounter for screening for respiratory disorder NEC cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the encounter for screening for respiratory disorder NEC diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many encounter for screening for respiratory disorder NEC diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many carcinoma in situ of floor of mouth diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of carcinoma in situ of floor of mouth cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the carcinoma in situ of floor of mouth diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many carcinoma in situ of floor of mouth diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many carcinoma in situ of skin of other and unspecified parts of face diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of carcinoma in situ of skin of other and unspecified parts of face cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the carcinoma in situ of skin of other and unspecified parts of face diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many carcinoma in situ of skin of other and unspecified parts of face diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many fracture of symphysis of mandible, initial encounter for open fracture diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of fracture of symphysis of mandible, initial encounter for open fracture cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the fracture of symphysis of mandible, initial encounter for open fracture diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many fracture of symphysis of mandible, initial encounter for open fracture diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many malignant neoplasm of endometrium diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of malignant neoplasm of endometrium cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the malignant neoplasm of endometrium diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many malignant neoplasm of endometrium diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many carcinoma in situ of skin of lip diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of carcinoma in situ of skin of lip cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the carcinoma in situ of skin of lip diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many carcinoma in situ of skin of lip diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many malignant neoplasm of left lacrimal gland and duct diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of malignant neoplasm of left lacrimal gland and duct cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the malignant neoplasm of left lacrimal gland and duct diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many malignant neoplasm of left lacrimal gland and duct diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many carcinoma in situ of skin, unspecified diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of carcinoma in situ of skin, unspecified cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the carcinoma in situ of skin, unspecified diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many carcinoma in situ of skin, unspecified diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many partial loss of teeth due to trauma, class III diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of partial loss of teeth due to trauma, class III cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the partial loss of teeth due to trauma, class III diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many partial loss of teeth due to trauma, class III diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many aggressive periodontitis, generalized, slight diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of aggressive periodontitis, generalized, slight cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the aggressive periodontitis, generalized, slight diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many aggressive periodontitis, generalized, slight diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many benign neoplasm of prostate diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of benign neoplasm of prostate cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the benign neoplasm of prostate diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many benign neoplasm of prostate diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many malignant neoplasm of posterior wall of hypopharynx diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of malignant neoplasm of posterior wall of hypopharynx cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the malignant neoplasm of posterior wall of hypopharynx diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many malignant neoplasm of posterior wall of hypopharynx diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many complete loss of teeth, unspecified cause, class IV diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of complete loss of teeth, unspecified cause, class IV cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the complete loss of teeth, unspecified cause, class IV diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many complete loss of teeth, unspecified cause, class IV diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many hemangioma of intracranial structures diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of hemangioma of intracranial structures cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the hemangioma of intracranial structures diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many hemangioma of intracranial structures diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many history of undergoing in utero procedure while a fetus diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of history of undergoing in utero procedure while a fetus cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the history of undergoing in utero procedure while a fetus diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many history of undergoing in utero procedure while a fetus diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many gingival recession, generalized diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of gingival recession, generalized cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the gingival recession, generalized diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many gingival recession, generalized diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many posteruptive color changes of dental hard tissues diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of posteruptive color changes of dental hard tissues cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the posteruptive color changes of dental hard tissues diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many posteruptive color changes of dental hard tissues diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many benign neoplasm of other parts of oropharynx diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of benign neoplasm of other parts of oropharynx cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the benign neoplasm of other parts of oropharynx diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many benign neoplasm of other parts of oropharynx diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many localised slight aggressive periodontitis diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of localised slight aggressive periodontitis cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the localised slight aggressive periodontitis diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many localised slight aggressive periodontitis diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many encounter for routine child health examination with abnormal findings diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of encounter for routine child health examination with abnormal findings cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the encounter for routine child health examination with abnormal findings diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many encounter for routine child health examination with abnormal findings diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many chronic myelomonocytic leukemia not having achieved remission diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of chronic myelomonocytic leukemia not having achieved remission cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the chronic myelomonocytic leukemia not having achieved remission diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many chronic myelomonocytic leukemia not having achieved remission diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many gingival recession, localized diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of gingival recession, localized cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the gingival recession, localized diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many gingival recession, localized diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many waldenstr\u00f6m macroglobulinemia diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of waldenstr\u00f6m macroglobulinemia cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the waldenstr\u00f6m macroglobulinemia diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many waldenstr\u00f6m macroglobulinemia diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many cheek and lip biting diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of cheek and lip biting cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the cheek and lip biting diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many cheek and lip biting diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many neoplasm of uncertain behavior of connective and other soft tissue diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of neoplasm of uncertain behavior of connective and other soft tissue cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the neoplasm of uncertain behavior of connective and other soft tissue diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many neoplasm of uncertain behavior of connective and other soft tissue diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many other malignant neuroendocrine tumors diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of other malignant neuroendocrine tumors cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the other malignant neuroendocrine tumors diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many other malignant neuroendocrine tumors diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many merkel cell carcinoma of unspecified part of face diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of merkel cell carcinoma of unspecified part of face cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the merkel cell carcinoma of unspecified part of face diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many merkel cell carcinoma of unspecified part of face diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many basal cell carcinoma of skin of other parts of face diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of basal cell carcinoma of skin of other parts of face cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the basal cell carcinoma of skin of other parts of face diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many basal cell carcinoma of skin of other parts of face diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many horizontal displacement of fully erupted tooth or teeth diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of horizontal displacement of fully erupted tooth or teeth cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the horizontal displacement of fully erupted tooth or teeth diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many horizontal displacement of fully erupted tooth or teeth diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many maxillary fracture, unspecified side, initial encounter for open fracture diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of maxillary fracture, unspecified side, initial encounter for open fracture cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the maxillary fracture, unspecified side, initial encounter for open fracture diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many maxillary fracture, unspecified side, initial encounter for open fracture diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many carcinoma in situ of gingiva and edentulous alveolar ridge diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of carcinoma in situ of gingiva and edentulous alveolar ridge cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the carcinoma in situ of gingiva and edentulous alveolar ridge diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many carcinoma in situ of gingiva and edentulous alveolar ridge diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many localized gingival recession, minimal diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of localized gingival recession, minimal cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the localized gingival recession, minimal diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many localized gingival recession, minimal diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many benign neoplasm of larynx diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of benign neoplasm of larynx cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the benign neoplasm of larynx diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many benign neoplasm of larynx diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many encounter for other general examination diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of encounter for other general examination cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the encounter for other general examination diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many encounter for other general examination diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many other benign neoplasm of skin of other parts of face diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of other benign neoplasm of skin of other parts of face cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the other benign neoplasm of skin of other parts of face diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many other benign neoplasm of skin of other parts of face diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "How many fracture of subcondylar process of right mandible diagnoses have since resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "What is the count of fracture of subcondylar process of right mandible cases that have a recorded resolution (abatement) date?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "physician", "question": "Of all the fracture of subcondylar process of right mandible diagnoses, how many have actually resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_resolved_condition_count", "tier": 2, "persona": "population_health_analyst", "question": "How many fracture of subcondylar process of right mandible diagnoses in our data show an abatement date, meaning they were resolved?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"abatementDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": null,\n \"order_by\": null,\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT COUNT(*) AS resolved_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND abatementDateTime IS NOT NULL", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "abatementDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": null, "order_by": null, "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new secondary Merkel cell carcinoma diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new secondary Merkel cell carcinoma diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new secondary Merkel cell carcinoma diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many secondary Merkel cell carcinoma cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Secondary Merkel cell carcinoma\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Secondary Merkel cell carcinoma%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Secondary Merkel cell carcinoma", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Secondary Merkel cell carcinoma", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new supernumerary teeth diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new supernumerary teeth diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new supernumerary teeth diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many supernumerary teeth cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Supernumerary teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Supernumerary teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Supernumerary teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Supernumerary teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new complete loss of teeth due to caries, class III diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new complete loss of teeth due to caries, class III diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new complete loss of teeth due to caries, class III diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many complete loss of teeth due to caries, class III cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth due to caries, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth due to caries, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth due to caries, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth due to caries, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new partial loss of teeth due to other specified cause, class II diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new partial loss of teeth due to other specified cause, class II diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new partial loss of teeth due to other specified cause, class II diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many partial loss of teeth due to other specified cause, class II cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to other specified cause, class II\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to other specified cause, class II%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to other specified cause, class II", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to other specified cause, class II", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new malignant neoplasm of ethmoidal sinus diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new malignant neoplasm of ethmoidal sinus diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new malignant neoplasm of ethmoidal sinus diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many malignant neoplasm of ethmoidal sinus cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of ethmoidal sinus\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of ethmoidal sinus%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of ethmoidal sinus", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of ethmoidal sinus", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new diffuse large B-cell lymphoma, lymph nodes of multiple sites diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many diffuse large B-cell lymphoma, lymph nodes of multiple sites cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Diffuse large B-cell lymphoma, lymph nodes of multiple sites\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Diffuse large B-cell lymphoma, lymph nodes of multiple sites%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Diffuse large B-cell lymphoma, lymph nodes of multiple sites", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new malignant neoplasm of upper lobe, bronchus or lung diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new malignant neoplasm of upper lobe, bronchus or lung diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new malignant neoplasm of upper lobe, bronchus or lung diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many malignant neoplasm of upper lobe, bronchus or lung cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of upper lobe, bronchus or lung\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of upper lobe, bronchus or lung%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of upper lobe, bronchus or lung", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of upper lobe, bronchus or lung", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new atrophy of salivary gland diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new atrophy of salivary gland diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new atrophy of salivary gland diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many atrophy of salivary gland cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Atrophy of salivary gland\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Atrophy of salivary gland%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Atrophy of salivary gland", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Atrophy of salivary gland", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new chronic sialoadenitis diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new chronic sialoadenitis diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new chronic sialoadenitis diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many chronic sialoadenitis cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new lupus erythematosus diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new lupus erythematosus diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new lupus erythematosus diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many lupus erythematosus cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Lupus erythematosus (disorder)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Lupus erythematosus (disorder)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Lupus erythematosus (disorder)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Lupus erythematosus (disorder)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new malignant neoplasm of connective and soft tissue of head, face and neck diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new malignant neoplasm of connective and soft tissue of head, face and neck diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new malignant neoplasm of connective and soft tissue of head, face and neck diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many malignant neoplasm of connective and soft tissue of head, face and neck cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of connective and soft tissue of head, face and neck\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of connective and soft tissue of head, face and neck%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of connective and soft tissue of head, face and neck", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of connective and soft tissue of head, face and neck", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new other specified malignant neoplasm of skin of upper limb, including shoulder diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new other specified malignant neoplasm of skin of upper limb, including shoulder diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new other specified malignant neoplasm of skin of upper limb, including shoulder diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many other specified malignant neoplasm of skin of upper limb, including shoulder cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified malignant neoplasm of skin of upper limb, including shoulder\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified malignant neoplasm of skin of upper limb, including shoulder%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified malignant neoplasm of skin of upper limb, including shoulder", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new partial loss of teeth due to periodontal diseases, class IV diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new partial loss of teeth due to periodontal diseases, class IV diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new partial loss of teeth due to periodontal diseases, class IV diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many partial loss of teeth due to periodontal diseases, class IV cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to periodontal diseases, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to periodontal diseases, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to periodontal diseases, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to periodontal diseases, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new acute recurrent sialoadenitis diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new acute recurrent sialoadenitis diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new acute recurrent sialoadenitis diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many acute recurrent sialoadenitis cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Acute recurrent sialoadenitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Acute recurrent sialoadenitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Acute recurrent sialoadenitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Acute recurrent sialoadenitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new maxillary fracture, right side, initial encounter for closed fracture diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new maxillary fracture, right side, initial encounter for closed fracture diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new maxillary fracture, right side, initial encounter for closed fracture diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many maxillary fracture, right side, initial encounter for closed fracture cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, right side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, right side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, right side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, right side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new other specified types of non-Hodgkin lymphoma, unspecified site diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new other specified types of non-Hodgkin lymphoma, unspecified site diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new other specified types of non-Hodgkin lymphoma, unspecified site diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many other specified types of non-Hodgkin lymphoma, unspecified site cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other specified types of non-Hodgkin lymphoma, unspecified site\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other specified types of non-Hodgkin lymphoma, unspecified site%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other specified types of non-Hodgkin lymphoma, unspecified site", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other specified types of non-Hodgkin lymphoma, unspecified site", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new fracture of ramus of right mandible, subsequent encounter for fracture with routine healing diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many fracture of ramus of right mandible, subsequent encounter for fracture with routine healing cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of ramus of right mandible, subsequent encounter for fracture with routine healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new fracture of alveolus of right mandible, initial encounter for closed fracture diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new fracture of alveolus of right mandible, initial encounter for closed fracture diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new fracture of alveolus of right mandible, initial encounter for closed fracture diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many fracture of alveolus of right mandible, initial encounter for closed fracture cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of alveolus of right mandible, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of alveolus of right mandible, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of alveolus of right mandible, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new encounter for screening for respiratory disorder NEC diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new encounter for screening for respiratory disorder NEC diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new encounter for screening for respiratory disorder NEC diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many encounter for screening for respiratory disorder NEC cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for screening for respiratory disorder NEC\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for screening for respiratory disorder NEC%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for screening for respiratory disorder NEC", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for screening for respiratory disorder NEC", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new carcinoma in situ of floor of mouth diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new carcinoma in situ of floor of mouth diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new carcinoma in situ of floor of mouth diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many carcinoma in situ of floor of mouth cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of floor of mouth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of floor of mouth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of floor of mouth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of floor of mouth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new carcinoma in situ of skin of other and unspecified parts of face diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new carcinoma in situ of skin of other and unspecified parts of face diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new carcinoma in situ of skin of other and unspecified parts of face diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many carcinoma in situ of skin of other and unspecified parts of face cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of other and unspecified parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of other and unspecified parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of other and unspecified parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of other and unspecified parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of tooth (traumatic), subsequent encounter for fracture with delayed healing", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new fracture of symphysis of mandible, initial encounter for open fracture diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new fracture of symphysis of mandible, initial encounter for open fracture diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new fracture of symphysis of mandible, initial encounter for open fracture diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many fracture of symphysis of mandible, initial encounter for open fracture cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of symphysis of mandible, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of symphysis of mandible, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of symphysis of mandible, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of symphysis of mandible, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of condylar process of mandible, unspecified side, initial encounter for closed fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new malignant neoplasm of endometrium diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new malignant neoplasm of endometrium diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new malignant neoplasm of endometrium diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many malignant neoplasm of endometrium cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of endometrium\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of endometrium%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of endometrium", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of endometrium", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new carcinoma in situ of skin of lip diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new carcinoma in situ of skin of lip diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new carcinoma in situ of skin of lip diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many carcinoma in situ of skin of lip cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin of lip\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin of lip%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin of lip", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin of lip", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new malignant neoplasm of left lacrimal gland and duct diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new malignant neoplasm of left lacrimal gland and duct diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new malignant neoplasm of left lacrimal gland and duct diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many malignant neoplasm of left lacrimal gland and duct cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of left lacrimal gland and duct\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of left lacrimal gland and duct%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of left lacrimal gland and duct", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of left lacrimal gland and duct", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new carcinoma in situ of skin, unspecified diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new carcinoma in situ of skin, unspecified diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new carcinoma in situ of skin, unspecified diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many carcinoma in situ of skin, unspecified cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of skin, unspecified\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of skin, unspecified%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of skin, unspecified", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of skin, unspecified", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new partial loss of teeth due to trauma, class III diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new partial loss of teeth due to trauma, class III diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new partial loss of teeth due to trauma, class III diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many partial loss of teeth due to trauma, class III cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Partial loss of teeth due to trauma, class III\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Partial loss of teeth due to trauma, class III%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Partial loss of teeth due to trauma, class III", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Partial loss of teeth due to trauma, class III", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new aggressive periodontitis, generalized, slight diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new aggressive periodontitis, generalized, slight diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new aggressive periodontitis, generalized, slight diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many aggressive periodontitis, generalized, slight cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Aggressive periodontitis, generalized, slight\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Aggressive periodontitis, generalized, slight%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Aggressive periodontitis, generalized, slight", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Aggressive periodontitis, generalized, slight", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new benign neoplasm of prostate diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new benign neoplasm of prostate diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new benign neoplasm of prostate diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many benign neoplasm of prostate cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of prostate\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of prostate%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of prostate", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of prostate", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new malignant neoplasm of posterior wall of hypopharynx diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new malignant neoplasm of posterior wall of hypopharynx diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new malignant neoplasm of posterior wall of hypopharynx diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many malignant neoplasm of posterior wall of hypopharynx cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Malignant neoplasm of posterior wall of hypopharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Malignant neoplasm of posterior wall of hypopharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Malignant neoplasm of posterior wall of hypopharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Malignant neoplasm of posterior wall of hypopharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new complete loss of teeth, unspecified cause, class IV diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new complete loss of teeth, unspecified cause, class IV diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new complete loss of teeth, unspecified cause, class IV diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many complete loss of teeth, unspecified cause, class IV cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Complete loss of teeth, unspecified cause, class IV\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Complete loss of teeth, unspecified cause, class IV%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Complete loss of teeth, unspecified cause, class IV", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Complete loss of teeth, unspecified cause, class IV", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new hemangioma of intracranial structures diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new hemangioma of intracranial structures diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new hemangioma of intracranial structures diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many hemangioma of intracranial structures cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Hemangioma of intracranial structures\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Hemangioma of intracranial structures%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Hemangioma of intracranial structures", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Hemangioma of intracranial structures", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new history of undergoing in utero procedure while a fetus diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new history of undergoing in utero procedure while a fetus diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new history of undergoing in utero procedure while a fetus diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many history of undergoing in utero procedure while a fetus cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"History of undergoing in utero procedure while a fetus (situation)\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%History of undergoing in utero procedure while a fetus (situation)%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "History of undergoing in utero procedure while a fetus (situation)", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "History of undergoing in utero procedure while a fetus (situation)", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new gingival recession, generalized diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new gingival recession, generalized diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new gingival recession, generalized diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many gingival recession, generalized cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, generalized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, generalized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, generalized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, generalized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new posteruptive color changes of dental hard tissues diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new posteruptive color changes of dental hard tissues diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new posteruptive color changes of dental hard tissues diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many posteruptive color changes of dental hard tissues cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Posteruptive color changes of dental hard tissues\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Posteruptive color changes of dental hard tissues%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Posteruptive color changes of dental hard tissues", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Posteruptive color changes of dental hard tissues", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new benign neoplasm of other parts of oropharynx diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new benign neoplasm of other parts of oropharynx diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new benign neoplasm of other parts of oropharynx diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many benign neoplasm of other parts of oropharynx cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of other parts of oropharynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of other parts of oropharynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of other parts of oropharynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of other parts of oropharynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new localised slight aggressive periodontitis diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new localised slight aggressive periodontitis diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new localised slight aggressive periodontitis diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many localised slight aggressive periodontitis cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localised slight aggressive periodontitis\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localised slight aggressive periodontitis%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localised slight aggressive periodontitis", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localised slight aggressive periodontitis", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new encounter for routine child health examination with abnormal findings diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new encounter for routine child health examination with abnormal findings diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new encounter for routine child health examination with abnormal findings diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many encounter for routine child health examination with abnormal findings cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for routine child health examination with abnormal findings\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for routine child health examination with abnormal findings%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for routine child health examination with abnormal findings", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for routine child health examination with abnormal findings", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new chronic myelomonocytic leukemia not having achieved remission diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new chronic myelomonocytic leukemia not having achieved remission diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new chronic myelomonocytic leukemia not having achieved remission diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many chronic myelomonocytic leukemia not having achieved remission cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Chronic myelomonocytic leukemia not having achieved remission\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Chronic myelomonocytic leukemia not having achieved remission%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Chronic myelomonocytic leukemia not having achieved remission", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Chronic myelomonocytic leukemia not having achieved remission", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new gingival recession, localized diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new gingival recession, localized diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new gingival recession, localized diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many gingival recession, localized cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Gingival recession, localized\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Gingival recession, localized%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Gingival recession, localized", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Gingival recession, localized", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new waldenstr\u00f6m macroglobulinemia diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new waldenstr\u00f6m macroglobulinemia diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new waldenstr\u00f6m macroglobulinemia diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many waldenstr\u00f6m macroglobulinemia cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Waldenstr\\u00f6m macroglobulinemia\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Waldenstr\u00f6m macroglobulinemia%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Waldenstr\u00f6m macroglobulinemia", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Waldenstr\u00f6m macroglobulinemia", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new cheek and lip biting diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new cheek and lip biting diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new cheek and lip biting diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many cheek and lip biting cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Cheek and lip biting\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Cheek and lip biting%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Cheek and lip biting", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Cheek and lip biting", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new neoplasm of uncertain behavior of connective and other soft tissue diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new neoplasm of uncertain behavior of connective and other soft tissue diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new neoplasm of uncertain behavior of connective and other soft tissue diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many neoplasm of uncertain behavior of connective and other soft tissue cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Neoplasm of uncertain behavior of connective and other soft tissue\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Neoplasm of uncertain behavior of connective and other soft tissue%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Neoplasm of uncertain behavior of connective and other soft tissue", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Neoplasm of uncertain behavior of connective and other soft tissue", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new other malignant neuroendocrine tumors diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new other malignant neuroendocrine tumors diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new other malignant neuroendocrine tumors diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many other malignant neuroendocrine tumors cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other malignant neuroendocrine tumors\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other malignant neuroendocrine tumors%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other malignant neuroendocrine tumors", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other malignant neuroendocrine tumors", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new merkel cell carcinoma of unspecified part of face diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new merkel cell carcinoma of unspecified part of face diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new merkel cell carcinoma of unspecified part of face diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many merkel cell carcinoma of unspecified part of face cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Merkel cell carcinoma of unspecified part of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Merkel cell carcinoma of unspecified part of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Merkel cell carcinoma of unspecified part of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Merkel cell carcinoma of unspecified part of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new basal cell carcinoma of skin of other parts of face diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new basal cell carcinoma of skin of other parts of face diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new basal cell carcinoma of skin of other parts of face diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many basal cell carcinoma of skin of other parts of face cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Basal cell carcinoma of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Basal cell carcinoma of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Basal cell carcinoma of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Basal cell carcinoma of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new horizontal displacement of fully erupted tooth or teeth diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new horizontal displacement of fully erupted tooth or teeth diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new horizontal displacement of fully erupted tooth or teeth diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many horizontal displacement of fully erupted tooth or teeth cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Horizontal displacement of fully erupted tooth or teeth\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Horizontal displacement of fully erupted tooth or teeth%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Horizontal displacement of fully erupted tooth or teeth", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Horizontal displacement of fully erupted tooth or teeth", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new maxillary fracture, unspecified side, initial encounter for open fracture diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new maxillary fracture, unspecified side, initial encounter for open fracture diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new maxillary fracture, unspecified side, initial encounter for open fracture diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many maxillary fracture, unspecified side, initial encounter for open fracture cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Maxillary fracture, unspecified side, initial encounter for open fracture\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Maxillary fracture, unspecified side, initial encounter for open fracture%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Maxillary fracture, unspecified side, initial encounter for open fracture", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Maxillary fracture, unspecified side, initial encounter for open fracture", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new carcinoma in situ of gingiva and edentulous alveolar ridge diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new carcinoma in situ of gingiva and edentulous alveolar ridge diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new carcinoma in situ of gingiva and edentulous alveolar ridge diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many carcinoma in situ of gingiva and edentulous alveolar ridge cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Carcinoma in situ of gingiva and edentulous alveolar ridge\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Carcinoma in situ of gingiva and edentulous alveolar ridge%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Carcinoma in situ of gingiva and edentulous alveolar ridge", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new localized gingival recession, minimal diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new localized gingival recession, minimal diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new localized gingival recession, minimal diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many localized gingival recession, minimal cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Localized gingival recession, minimal\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Localized gingival recession, minimal%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Localized gingival recession, minimal", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Localized gingival recession, minimal", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new benign neoplasm of larynx diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new benign neoplasm of larynx diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new benign neoplasm of larynx diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many benign neoplasm of larynx cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Benign neoplasm of larynx\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Benign neoplasm of larynx%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Benign neoplasm of larynx", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Benign neoplasm of larynx", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new encounter for other general examination diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new encounter for other general examination diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new encounter for other general examination diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many encounter for other general examination cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Encounter for other general examination\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Encounter for other general examination%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Encounter for other general examination", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Encounter for other general examination", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new other benign neoplasm of skin of other parts of face diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new other benign neoplasm of skin of other parts of face diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new other benign neoplasm of skin of other parts of face diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many other benign neoplasm of skin of other parts of face cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Other benign neoplasm of skin of other parts of face\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Other benign neoplasm of skin of other parts of face%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Other benign neoplasm of skin of other parts of face", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Other benign neoplasm of skin of other parts of face", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "How many new fracture of subcondylar process of right mandible diagnoses were recorded each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Can you break down the number of new fracture of subcondylar process of right mandible diagnoses by year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "population_health_analyst", "question": "Show me the yearly trend of new fracture of subcondylar process of right mandible diagnoses.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_condition_diagnoses_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year by year, how many fracture of subcondylar process of right mandible cases were newly diagnosed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Fracture of subcondylar process of right mandible\",\n \"domain\": \"condition\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"onsetDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:onsetDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'condition' AND display ILIKE '%Fracture of subcondylar process of right mandible%'\n )\n SELECT EXTRACT(YEAR FROM onsetDateTime) AS diagnosis_year, COUNT(*) AS diagnosis_count\n FROM condition, resolved\n WHERE condition.code = resolved.code AND condition.system = resolved.code_system\n AND onsetDateTime IS NOT NULL\n GROUP BY diagnosis_year\n ORDER BY diagnosis_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Fracture of subcondylar process of right mandible", "domain": "condition", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "onsetDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:onsetDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Fracture of subcondylar process of right mandible", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "For telmisartan 80 MG Oral Tablet [Micardis], how many prescriptions are active versus stopped versus completed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Break down telmisartan 80 MG Oral Tablet [Micardis] prescription counts by status.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "What's the status breakdown -- active, stopped, completed -- for telmisartan 80 MG Oral Tablet [Micardis] orders?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Give me the prescription status distribution for telmisartan 80 MG Oral Tablet [Micardis].", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "For irbesartan 75 MG Oral Tablet, how many prescriptions are active versus stopped versus completed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Break down irbesartan 75 MG Oral Tablet prescription counts by status.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "What's the status breakdown -- active, stopped, completed -- for irbesartan 75 MG Oral Tablet orders?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Give me the prescription status distribution for irbesartan 75 MG Oral Tablet.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "For saquinavir mesylate 500 MG Oral Tablet, how many prescriptions are active versus stopped versus completed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Break down saquinavir mesylate 500 MG Oral Tablet prescription counts by status.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "What's the status breakdown -- active, stopped, completed -- for saquinavir mesylate 500 MG Oral Tablet orders?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Give me the prescription status distribution for saquinavir mesylate 500 MG Oral Tablet.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "For 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex], how many prescriptions are active versus stopped versus completed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Break down 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] prescription counts by status.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "What's the status breakdown -- active, stopped, completed -- for 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] orders?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Give me the prescription status distribution for 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex].", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "For hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar], how many prescriptions are active versus stopped versus completed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Break down hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] prescription counts by status.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "What's the status breakdown -- active, stopped, completed -- for hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] orders?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Give me the prescription status distribution for hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar].", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "For telmisartan 40 MG Oral Tablet, how many prescriptions are active versus stopped versus completed?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Break down telmisartan 40 MG Oral Tablet prescription counts by status.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "pharmacist", "question": "What's the status breakdown -- active, stopped, completed -- for telmisartan 40 MG Oral Tablet orders?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_status_breakdown", "tier": 2, "persona": "finance_reviewer", "question": "Give me the prescription status distribution for telmisartan 40 MG Oral Tablet.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"status\",\n \"order_by\": \"count_desc\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT status, COUNT(*) AS request_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n GROUP BY status\n ORDER BY request_count DESC", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [], "aggregation": {"type": "count", "group_by": "status", "order_by": "count_desc", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "How many telmisartan 80 MG Oral Tablet [Micardis] prescriptions were written each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show me telmisartan 80 MG Oral Tablet [Micardis] prescription volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year over year, how many telmisartan 80 MG Oral Tablet [Micardis] orders have we issued?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "Break down the count of telmisartan 80 MG Oral Tablet [Micardis] prescriptions by the year they were authored.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 80 MG Oral Tablet [Micardis]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 80 MG Oral Tablet [Micardis]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 80 MG Oral Tablet [Micardis]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 80 MG Oral Tablet [Micardis]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "How many irbesartan 75 MG Oral Tablet prescriptions were written each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show me irbesartan 75 MG Oral Tablet prescription volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year over year, how many irbesartan 75 MG Oral Tablet orders have we issued?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "Break down the count of irbesartan 75 MG Oral Tablet prescriptions by the year they were authored.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"irbesartan 75 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%irbesartan 75 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "irbesartan 75 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "irbesartan 75 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "How many saquinavir mesylate 500 MG Oral Tablet prescriptions were written each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show me saquinavir mesylate 500 MG Oral Tablet prescription volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year over year, how many saquinavir mesylate 500 MG Oral Tablet orders have we issued?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "Break down the count of saquinavir mesylate 500 MG Oral Tablet prescriptions by the year they were authored.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"saquinavir mesylate 500 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%saquinavir mesylate 500 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "saquinavir mesylate 500 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "saquinavir mesylate 500 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "How many 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] prescriptions were written each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show me 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] prescription volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year over year, how many 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] orders have we issued?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "Break down the count of 60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex] prescriptions by the year they were authored.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "60 ACTUAT mometasone furoate 0.22 MG/ACTUAT Dry Powder Inhaler [Asmanex]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "How many hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] prescriptions were written each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show me hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] prescription volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year over year, how many hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] orders have we issued?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "Break down the count of hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar] prescriptions by the year they were authored.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "hydrochlorothiazide 25 MG / losartan potassium 100 MG Oral Tablet [Hyzaar]", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "How many telmisartan 40 MG Oral Tablet prescriptions were written each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show me telmisartan 40 MG Oral Tablet prescription volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Year over year, how many telmisartan 40 MG Oral Tablet orders have we issued?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_medication_by_year", "tier": 2, "persona": "pharmacist", "question": "Break down the count of telmisartan 40 MG Oral Tablet prescriptions by the year they were authored.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"telmisartan 40 MG Oral Tablet\",\n \"domain\": \"medication_request\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"authoredOn\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:authoredOn\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'medication_request' AND display ILIKE '%telmisartan 40 MG Oral Tablet%'\n )\n SELECT EXTRACT(YEAR FROM authoredOn) AS rx_year, COUNT(*) AS rx_count\n FROM medication_request, resolved\n WHERE medication_request.code = resolved.code AND medication_request.system = resolved.code_system\n AND authoredOn IS NOT NULL\n GROUP BY rx_year\n ORDER BY rx_year", "gold_plan": {"entities": [{"role": "primary", "concept": "telmisartan 40 MG Oral Tablet", "domain": "medication_request", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "authoredOn", "negate": false}], "aggregation": {"type": "count", "group_by": "year:authoredOn", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "telmisartan 40 MG Oral Tablet", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many alveolus - open reduction, may include stabilization of teeth procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down alveolus - open reduction, may include stabilization of teeth volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many alveolus - open reduction, may include stabilization of teeth procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed alveolus - open reduction, may include stabilization of teeth procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"alveolus - open reduction, may include stabilization of teeth\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%alveolus - open reduction, may include stabilization of teeth%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "alveolus - open reduction, may include stabilization of teeth", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "alveolus - open reduction, may include stabilization of teeth", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many treatment of root canal obstruction; non-surgical access procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down treatment of root canal obstruction; non-surgical access volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many treatment of root canal obstruction; non-surgical access procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed treatment of root canal obstruction; non-surgical access procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"treatment of root canal obstruction; non-surgical access\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%treatment of root canal obstruction; non-surgical access%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "treatment of root canal obstruction; non-surgical access", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "treatment of root canal obstruction; non-surgical access", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many repair of aortic valve procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down repair of aortic valve volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many repair of aortic valve procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed repair of aortic valve procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Repair of aortic valve (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Repair of aortic valve (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Repair of aortic valve (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Repair of aortic valve (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many fixed partial denture repair necessitated by restorative material failure procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down fixed partial denture repair necessitated by restorative material failure volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many fixed partial denture repair necessitated by restorative material failure procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed fixed partial denture repair necessitated by restorative material failure procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed partial denture repair necessitated by restorative material failure\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed partial denture repair necessitated by restorative material failure%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed partial denture repair necessitated by restorative material failure", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed partial denture repair necessitated by restorative material failure", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many onlay resinbased composite three surfaces procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down onlay resinbased composite three surfaces volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many onlay resinbased composite three surfaces procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed onlay resinbased composite three surfaces procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"onlay resinbased composite three surfaces\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%onlay resinbased composite three surfaces%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "onlay resinbased composite three surfaces", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "onlay resinbased composite three surfaces", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many endodontic endosseous implant procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down endodontic endosseous implant volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many endodontic endosseous implant procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed endodontic endosseous implant procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"endodontic endosseous implant\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%endodontic endosseous implant%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "endodontic endosseous implant", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "endodontic endosseous implant", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many joint reconstruction procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down joint reconstruction volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many joint reconstruction procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed joint reconstruction procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"joint reconstruction\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%joint reconstruction%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "joint reconstruction", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "joint reconstruction", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many stress breaker procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down stress breaker volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many stress breaker procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed stress breaker procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"stress breaker\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%stress breaker%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "stress breaker", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "stress breaker", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many genetic test for susceptibility to diseases - specimen analysis procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down genetic test for susceptibility to diseases - specimen analysis volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many genetic test for susceptibility to diseases - specimen analysis procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed genetic test for susceptibility to diseases - specimen analysis procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"genetic test for susceptibility to diseases - specimen analysis\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%genetic test for susceptibility to diseases - specimen analysis%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "genetic test for susceptibility to diseases - specimen analysis", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "genetic test for susceptibility to diseases - specimen analysis", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many d6973 procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down d6973 volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many d6973 procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed d6973 procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D6973\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D6973%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D6973", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D6973", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "accession of exfoliative cytologic smears, microscopic examination, preparation and transmission of written report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many treatment changed procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down treatment changed volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many treatment changed procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed treatment changed procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Treatment changed (situation)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Treatment changed (situation)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Treatment changed (situation)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Treatment changed (situation)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many transfusion of plasma procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down transfusion of plasma volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many transfusion of plasma procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed transfusion of plasma procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"Transfusion of plasma (procedure)\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%Transfusion of plasma (procedure)%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "Transfusion of plasma (procedure)", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "Transfusion of plasma (procedure)", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many replace all teeth and acrylic on cast metal framework maxillary procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down replace all teeth and acrylic on cast metal framework maxillary volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many replace all teeth and acrylic on cast metal framework maxillary procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed replace all teeth and acrylic on cast metal framework maxillary procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"replace all teeth and acrylic on cast metal framework maxillary\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%replace all teeth and acrylic on cast metal framework maxillary%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "replace all teeth and acrylic on cast metal framework maxillary", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "replace all teeth and acrylic on cast metal framework maxillary", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many post removal procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down post removal volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many post removal procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed post removal procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"post removal\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%post removal%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "post removal", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "post removal", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many extra-oral posterior dental radiographic image procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down extra-oral posterior dental radiographic image volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many extra-oral posterior dental radiographic image procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed extra-oral posterior dental radiographic image procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"extra-oral posterior dental radiographic image\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%extra-oral posterior dental radiographic image%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "extra-oral posterior dental radiographic image", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "extra-oral posterior dental radiographic image", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many adjust maxillofacial prosthetic appliance, by report procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down adjust maxillofacial prosthetic appliance, by report volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many adjust maxillofacial prosthetic appliance, by report procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed adjust maxillofacial prosthetic appliance, by report procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"adjust maxillofacial prosthetic appliance, by report\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%adjust maxillofacial prosthetic appliance, by report%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "adjust maxillofacial prosthetic appliance, by report", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "adjust maxillofacial prosthetic appliance, by report", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many palatal lift prosthesis, definitive procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down palatal lift prosthesis, definitive volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many palatal lift prosthesis, definitive procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed palatal lift prosthesis, definitive procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"palatal lift prosthesis, definitive\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%palatal lift prosthesis, definitive%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "palatal lift prosthesis, definitive", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "palatal lift prosthesis, definitive", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many fixed appliance therapy procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down fixed appliance therapy volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many fixed appliance therapy procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed fixed appliance therapy procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"fixed appliance therapy\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%fixed appliance therapy%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "fixed appliance therapy", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "fixed appliance therapy", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many semi-precision attachment - placement procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down semi-precision attachment - placement volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many semi-precision attachment - placement procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed semi-precision attachment - placement procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"semi-precision attachment - placement\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%semi-precision attachment - placement%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "semi-precision attachment - placement", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "semi-precision attachment - placement", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many sialodochoplasty procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down sialodochoplasty volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many sialodochoplasty procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed sialodochoplasty procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"sialodochoplasty\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%sialodochoplasty%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "sialodochoplasty", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "sialodochoplasty", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "How many d1201 procedures were performed each year?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "hospital_ceo", "question": "Break down d1201 volume by year.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "outpatient_clerk", "question": "Year by year, how many d1201 procedures have we done?", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "t2_procedure_by_year", "tier": 2, "persona": "finance_reviewer", "question": "Show annual counts of completed d1201 procedures.", "schema_ref": "schema/schema.sql", "target": "{\n \"entities\": [\n {\n \"role\": \"primary\",\n \"concept\": \"D1201\",\n \"domain\": \"procedure\",\n \"terminology_lookup\": true\n }\n ],\n \"joins\": [],\n \"constraints\": [\n {\n \"type\": \"existence\",\n \"field\": \"performedDateTime\",\n \"negate\": false\n }\n ],\n \"aggregation\": {\n \"type\": \"count\",\n \"group_by\": \"year:performedDateTime\",\n \"order_by\": \"chronological\",\n \"limit\": null,\n \"per_patient_metric\": null\n },\n \"abstain\": false\n}\n\n```sql\nWITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year\n```", "gold_sql": "WITH resolved AS (\n SELECT code, code_system FROM valuesets\n WHERE table_name = 'procedure' AND display ILIKE '%D1201%'\n )\n SELECT EXTRACT(YEAR FROM performedDateTime) AS proc_year, COUNT(*) AS proc_count\n FROM procedure, resolved\n WHERE procedure.code = resolved.code AND procedure.system = resolved.code_system\n AND performedDateTime IS NOT NULL\n GROUP BY proc_year\n ORDER BY proc_year", "gold_plan": {"entities": [{"role": "primary", "concept": "D1201", "domain": "procedure", "terminology_lookup": true}], "joins": [], "constraints": [{"type": "existence", "field": "performedDateTime", "negate": false}], "aggregation": {"type": "count", "group_by": "year:performedDateTime", "order_by": "chronological", "limit": null, "per_patient_metric": null}, "abstain": false}, "concept_display": "D1201", "flags": []} {"archetype_id": "unans_admitting_vs_attending", "tier": 5, "persona": "physician", "question": "Who was the admitting physician, as distinct from the attending physician, for this encounter?", "schema_ref": "schema/schema.sql", "excluded_concept": "Encounter.participant only ever has one entry (typed 'primary performer'); admitting/attending/consulting are not distinguishable roles in this schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_admitting_vs_attending", "tier": 5, "persona": "admission_clerk", "question": "I need the admitting physician's name specifically, not just whoever is listed as the provider -- who was it?", "schema_ref": "schema/schema.sql", "excluded_concept": "Encounter.participant only ever has one entry (typed 'primary performer'); admitting/attending/consulting are not distinguishable roles in this schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_admitting_vs_attending", "tier": 5, "persona": "hospital_ceo", "question": "For this stay, who was the attending physician versus the consulting physician?", "schema_ref": "schema/schema.sql", "excluded_concept": "Encounter.participant only ever has one entry (typed 'primary performer'); admitting/attending/consulting are not distinguishable roles in this schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_admitting_vs_attending", "tier": 5, "persona": "icu_manager", "question": "Which physician admitted this patient, as opposed to the one who's currently attending?", "schema_ref": "schema/schema.sql", "excluded_concept": "Encounter.participant only ever has one entry (typed 'primary performer'); admitting/attending/consulting are not distinguishable roles in this schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_nationality", "tier": 5, "persona": "admission_clerk", "question": "What is this patient's nationality?", "schema_ref": "schema/schema.sql", "excluded_concept": "no nationality/country-of-origin field exists anywhere in this data (Synthea only generates US-based synthetic patients with state/city addresses)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_nationality", "tier": 5, "persona": "hospital_ceo", "question": "How many of our patients are foreign nationals versus US citizens?", "schema_ref": "schema/schema.sql", "excluded_concept": "no nationality/country-of-origin field exists anywhere in this data (Synthea only generates US-based synthetic patients with state/city addresses)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_nationality", "tier": 5, "persona": "population_health_analyst", "question": "Can you break down our patient population by country of origin?", "schema_ref": "schema/schema.sql", "excluded_concept": "no nationality/country-of-origin field exists anywhere in this data (Synthea only generates US-based synthetic patients with state/city addresses)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_nationality", "tier": 5, "persona": "admission_clerk", "question": "What passport country does this patient hold?", "schema_ref": "schema/schema.sql", "excluded_concept": "no nationality/country-of-origin field exists anywhere in this data (Synthea only generates US-based synthetic patients with state/city addresses)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_future_appointment", "tier": 5, "persona": "outpatient_clerk", "question": "When is this patient's next scheduled appointment?", "schema_ref": "schema/schema.sql", "excluded_concept": "Synthea only generates completed historical encounters up to the frozen reference date; there is no scheduled/future-dated encounter data anywhere", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_future_appointment", "tier": 5, "persona": "admission_clerk", "question": "Does this patient have any upcoming visits booked?", "schema_ref": "schema/schema.sql", "excluded_concept": "Synthea only generates completed historical encounters up to the frozen reference date; there is no scheduled/future-dated encounter data anywhere", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_future_appointment", "tier": 5, "persona": "outpatient_clerk", "question": "What appointments do we have scheduled for next week?", "schema_ref": "schema/schema.sql", "excluded_concept": "Synthea only generates completed historical encounters up to the frozen reference date; there is no scheduled/future-dated encounter data anywhere", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_future_appointment", "tier": 5, "persona": "physician", "question": "When is my next follow-up with this patient?", "schema_ref": "schema/schema.sql", "excluded_concept": "Synthea only generates completed historical encounters up to the frozen reference date; there is no scheduled/future-dated encounter data anywhere", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_assignment", "tier": 5, "persona": "admission_clerk", "question": "Which department is this patient currently assigned to?", "schema_ref": "schema/schema.sql", "excluded_concept": "no department/ward/service-line concept exists anywhere in the schema (FHIR/Synthea doesn't model hospital departments as a resource)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_assignment", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the cardiology department versus oncology?", "schema_ref": "schema/schema.sql", "excluded_concept": "no department/ward/service-line concept exists anywhere in the schema (FHIR/Synthea doesn't model hospital departments as a resource)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_assignment", "tier": 5, "persona": "icu_manager", "question": "What ward is this patient on?", "schema_ref": "schema/schema.sql", "excluded_concept": "no department/ward/service-line concept exists anywhere in the schema (FHIR/Synthea doesn't model hospital departments as a resource)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_assignment", "tier": 5, "persona": "ed_manager", "question": "Which service line handled this case?", "schema_ref": "schema/schema.sql", "excluded_concept": "no department/ward/service-line concept exists anywhere in the schema (FHIR/Synthea doesn't model hospital departments as a resource)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_facility_address", "tier": 5, "persona": "admission_clerk", "question": "What is the address of the facility where this encounter took place?", "schema_ref": "schema/schema.sql", "excluded_concept": "no facility/location table exists in the core schema (Location data was not promoted from the extra_ tables)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_facility_address", "tier": 5, "persona": "hospital_ceo", "question": "Which of our facility locations saw the most encounters this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "no facility/location table exists in the core schema (Location data was not promoted from the extra_ tables)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_facility_address", "tier": 5, "persona": "outpatient_clerk", "question": "What room or building was this appointment held in?", "schema_ref": "schema/schema.sql", "excluded_concept": "no facility/location table exists in the core schema (Location data was not promoted from the extra_ tables)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_facility_address", "tier": 5, "persona": "finance_reviewer", "question": "Break down encounter volume by facility address.", "schema_ref": "schema/schema.sql", "excluded_concept": "no facility/location table exists in the core schema (Location data was not promoted from the extra_ tables)", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_care_team_roles", "tier": 5, "persona": "nurse", "question": "List everyone on this patient's care team, along with their roles.", "schema_ref": "schema/schema.sql", "excluded_concept": "encounter has a single participant_name field only; there is no multi-provider care-team-with-roles structure in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_care_team_roles", "tier": 5, "persona": "icu_manager", "question": "Who besides the primary physician is involved in this patient's care?", "schema_ref": "schema/schema.sql", "excluded_concept": "encounter has a single participant_name field only; there is no multi-provider care-team-with-roles structure in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_care_team_roles", "tier": 5, "persona": "physician", "question": "Show me the full care team assigned to this patient, with each person's role.", "schema_ref": "schema/schema.sql", "excluded_concept": "encounter has a single participant_name field only; there is no multi-provider care-team-with-roles structure in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_care_team_roles", "tier": 5, "persona": "nurse", "question": "Which nurses, specialists, and consultants are on this patient's care team?", "schema_ref": "schema/schema.sql", "excluded_concept": "encounter has a single participant_name field only; there is no multi-provider care-team-with-roles structure in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_provenance", "tier": 5, "persona": "hospital_ceo", "question": "Who last modified this patient's record, and when?", "schema_ref": "schema/schema.sql", "excluded_concept": "no audit-trail/provenance data (who last modified a record and when) exists in the core schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_provenance", "tier": 5, "persona": "infection_control_officer", "question": "What's the audit trail for changes to this patient's chart?", "schema_ref": "schema/schema.sql", "excluded_concept": "no audit-trail/provenance data (who last modified a record and when) exists in the core schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_provenance", "tier": 5, "persona": "admission_clerk", "question": "When was this record last updated, and by whom?", "schema_ref": "schema/schema.sql", "excluded_concept": "no audit-trail/provenance data (who last modified a record and when) exists in the core schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_provenance", "tier": 5, "persona": "population_health_analyst", "question": "Show me the edit history for this diagnosis entry.", "schema_ref": "schema/schema.sql", "excluded_concept": "no audit-trail/provenance data (who last modified a record and when) exists in the core schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_radiology_department", "tier": 5, "persona": "ed_manager", "question": "Which department ordered this imaging study?", "schema_ref": "schema/schema.sql", "excluded_concept": "imaging_study has no department/ordering-service field; no department concept exists anywhere in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_radiology_department", "tier": 5, "persona": "finance_reviewer", "question": "Break down imaging study volume by ordering department.", "schema_ref": "schema/schema.sql", "excluded_concept": "imaging_study has no department/ordering-service field; no department concept exists anywhere in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_radiology_department", "tier": 5, "persona": "hospital_ceo", "question": "Which service line orders the most radiology studies?", "schema_ref": "schema/schema.sql", "excluded_concept": "imaging_study has no department/ordering-service field; no department concept exists anywhere in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_radiology_department", "tier": 5, "persona": "ed_manager", "question": "Was this X-ray ordered by the ED or by an inpatient team?", "schema_ref": "schema/schema.sql", "excluded_concept": "imaging_study has no department/ordering-service field; no department concept exists anywhere in the schema", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_practitioner_specialty", "tier": 5, "persona": "admission_clerk", "question": "What is this physician's medical specialty?", "schema_ref": "schema/schema.sql", "excluded_concept": "only participant_name/npi and requester_name/npi are captured; no specialty, qualification, or license field exists for practitioners", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_practitioner_specialty", "tier": 5, "persona": "hospital_ceo", "question": "How many of our physicians are board-certified in cardiology?", "schema_ref": "schema/schema.sql", "excluded_concept": "only participant_name/npi and requester_name/npi are captured; no specialty, qualification, or license field exists for practitioners", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_practitioner_specialty", "tier": 5, "persona": "outpatient_clerk", "question": "Is this doctor a specialist or a general practitioner?", "schema_ref": "schema/schema.sql", "excluded_concept": "only participant_name/npi and requester_name/npi are captured; no specialty, qualification, or license field exists for practitioners", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_practitioner_specialty", "tier": 5, "persona": "finance_reviewer", "question": "Break down our physicians by specialty.", "schema_ref": "schema/schema.sql", "excluded_concept": "only participant_name/npi and requester_name/npi are captured; no specialty, qualification, or license field exists for practitioners", "concept_display": null, "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's gingivitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for gingivitis treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for gingivitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for gingivitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's social isolation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for social isolation treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for social isolation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for social isolation.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's victim of intimate partner abuse?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for victim of intimate partner abuse treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for victim of intimate partner abuse?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for victim of intimate partner abuse.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's anemia?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for anemia treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for anemia?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for anemia.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's essential hypertension?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for essential hypertension treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for essential hypertension?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for essential hypertension.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's chronic pain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for chronic pain treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for chronic pain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for chronic pain.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's metabolic syndrome X?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for metabolic syndrome X treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for metabolic syndrome X?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for metabolic syndrome X.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for fracture of bone treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for fracture of bone.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's disorder of kidney due to diabetes mellitus?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for disorder of kidney due to diabetes mellitus treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for disorder of kidney due to diabetes mellitus?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for disorder of kidney due to diabetes mellitus.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's sprain (morphologic abnormality)?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for sprain (morphologic abnormality) treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for sprain (morphologic abnormality)?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for sprain (morphologic abnormality).", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's housing unsatisfactory?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for housing unsatisfactory treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for housing unsatisfactory?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for housing unsatisfactory.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's history of coronary artery bypass grafting?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for history of coronary artery bypass grafting treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for history of coronary artery bypass grafting?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for history of coronary artery bypass grafting.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's history of tubal ligation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for history of tubal ligation treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for history of tubal ligation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for history of tubal ligation.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's sprain of ankle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for sprain of ankle treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for sprain of ankle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for sprain of ankle.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's acute infective cystitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for acute infective cystitis treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for acute infective cystitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for acute infective cystitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's transport problem?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for transport problem treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for transport problem?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for transport problem.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's history of myocardial infarction?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for history of myocardial infarction treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for history of myocardial infarction?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for history of myocardial infarction.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's concussion injury of brain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for concussion injury of brain treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for concussion injury of brain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for concussion injury of brain.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's serving in military service?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for serving in military service treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for serving in military service?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for serving in military service.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's sinusitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for sinusitis treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for sinusitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for sinusitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's awaiting transplantation of kidney?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for awaiting transplantation of kidney treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for awaiting transplantation of kidney?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for awaiting transplantation of kidney.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's cough?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for cough treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for cough?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for cough.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's sleep disorder?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for sleep disorder treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for sleep disorder?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for sleep disorder.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's history of appendectomy?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for history of appendectomy treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for history of appendectomy?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for history of appendectomy.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's whiplash injury to neck?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for whiplash injury to neck treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for whiplash injury to neck?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for whiplash injury to neck.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's sprain of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for sprain of wrist treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for sprain of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for sprain of wrist.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's fracture of clavicle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for fracture of clavicle treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for fracture of clavicle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for fracture of clavicle.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's sepsis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for sepsis treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for sepsis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for sepsis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's obstructive sleep apnea syndrome?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for obstructive sleep apnea syndrome treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for obstructive sleep apnea syndrome?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for obstructive sleep apnea syndrome.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's recurrent rectal polyp?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for recurrent rectal polyp treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for recurrent rectal polyp?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for recurrent rectal polyp.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's fracture subluxation of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for fracture subluxation of wrist treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for fracture subluxation of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for fracture subluxation of wrist.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's laceration of foot?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for laceration of foot treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for laceration of foot?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for laceration of foot.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's neoplasm of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for neoplasm of prostate treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for neoplasm of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for neoplasm of prostate.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's osteoporotic fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for osteoporotic fracture of bone treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for osteoporotic fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for osteoporotic fracture of bone.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's carcinoma in situ of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for carcinoma in situ of prostate treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for carcinoma in situ of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for carcinoma in situ of prostate.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's cracked tooth?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for cracked tooth treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for cracked tooth?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for cracked tooth.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's generalised chronic periodontitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for generalised chronic periodontitis treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for generalised chronic periodontitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for generalised chronic periodontitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's childhood asthma?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for childhood asthma treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for childhood asthma?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for childhood asthma.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's suspected prostate cancer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for suspected prostate cancer treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for suspected prostate cancer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for suspected prostate cancer.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "How much was billed for this patient's epidermal burn of skin?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "What's the total claim amount for epidermal burn of skin treatment this year?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "finance_reviewer", "question": "What did we charge the insurer for epidermal burn of skin?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_amount", "tier": 5, "persona": "hospital_ceo", "question": "Show me the average reimbursement for epidermal burn of skin.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's depression screening approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Depression screening (procedure))", "concept_display": "Depression screening (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many depression screening claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Depression screening (procedure))", "concept_display": "Depression screening (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving depression screening?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Depression screening (procedure))", "concept_display": "Depression screening (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which depression screening claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Depression screening (procedure))", "concept_display": "Depression screening (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's initial patient assessment approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Initial patient assessment (procedure))", "concept_display": "Initial patient assessment (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many initial patient assessment claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Initial patient assessment (procedure))", "concept_display": "Initial patient assessment (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving initial patient assessment?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Initial patient assessment (procedure))", "concept_display": "Initial patient assessment (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which initial patient assessment claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Initial patient assessment (procedure))", "concept_display": "Initial patient assessment (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's history AND physical examination approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History AND physical examination (procedure))", "concept_display": "History AND physical examination (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many history AND physical examination claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History AND physical examination (procedure))", "concept_display": "History AND physical examination (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving history AND physical examination?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History AND physical examination (procedure))", "concept_display": "History AND physical examination (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which history AND physical examination claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History AND physical examination (procedure))", "concept_display": "History AND physical examination (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's occupational therapy approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Occupational therapy (regime/therapy))", "concept_display": "Occupational therapy (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many occupational therapy claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Occupational therapy (regime/therapy))", "concept_display": "Occupational therapy (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving occupational therapy?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Occupational therapy (regime/therapy))", "concept_display": "Occupational therapy (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which occupational therapy claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Occupational therapy (regime/therapy))", "concept_display": "Occupational therapy (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's resin-based composite - one surface, posterior approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - one surface, posterior)", "concept_display": "resin-based composite - one surface, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many resin-based composite - one surface, posterior claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - one surface, posterior)", "concept_display": "resin-based composite - one surface, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving resin-based composite - one surface, posterior?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - one surface, posterior)", "concept_display": "resin-based composite - one surface, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which resin-based composite - one surface, posterior claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - one surface, posterior)", "concept_display": "resin-based composite - one surface, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's speech and language therapy regime approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Speech and language therapy regime (regime/therapy))", "concept_display": "Speech and language therapy regime (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many speech and language therapy regime claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Speech and language therapy regime (regime/therapy))", "concept_display": "Speech and language therapy regime (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving speech and language therapy regime?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Speech and language therapy regime (regime/therapy))", "concept_display": "Speech and language therapy regime (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which speech and language therapy regime claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Speech and language therapy regime (regime/therapy))", "concept_display": "Speech and language therapy regime (regime/therapy)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's hepatitis B surface antigen measurement approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hepatitis B surface antigen measurement (procedure))", "concept_display": "Hepatitis B surface antigen measurement (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many hepatitis B surface antigen measurement claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hepatitis B surface antigen measurement (procedure))", "concept_display": "Hepatitis B surface antigen measurement (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving hepatitis B surface antigen measurement?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hepatitis B surface antigen measurement (procedure))", "concept_display": "Hepatitis B surface antigen measurement (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which hepatitis B surface antigen measurement claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hepatitis B surface antigen measurement (procedure))", "concept_display": "Hepatitis B surface antigen measurement (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's alpha-fetoprotein test - antenatal approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alpha-fetoprotein test - antenatal (procedure))", "concept_display": "Alpha-fetoprotein test - antenatal (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many alpha-fetoprotein test - antenatal claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alpha-fetoprotein test - antenatal (procedure))", "concept_display": "Alpha-fetoprotein test - antenatal (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving alpha-fetoprotein test - antenatal?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alpha-fetoprotein test - antenatal (procedure))", "concept_display": "Alpha-fetoprotein test - antenatal (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which alpha-fetoprotein test - antenatal claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alpha-fetoprotein test - antenatal (procedure))", "concept_display": "Alpha-fetoprotein test - antenatal (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's resin-based composite - two surfaces, posterior approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - two surfaces, posterior)", "concept_display": "resin-based composite - two surfaces, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many resin-based composite - two surfaces, posterior claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - two surfaces, posterior)", "concept_display": "resin-based composite - two surfaces, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving resin-based composite - two surfaces, posterior?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - two surfaces, posterior)", "concept_display": "resin-based composite - two surfaces, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which resin-based composite - two surfaces, posterior claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: resin-based composite - two surfaces, posterior)", "concept_display": "resin-based composite - two surfaces, posterior", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's percutaneous coronary intervention approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Percutaneous coronary intervention)", "concept_display": "Percutaneous coronary intervention", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many percutaneous coronary intervention claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Percutaneous coronary intervention)", "concept_display": "Percutaneous coronary intervention", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving percutaneous coronary intervention?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Percutaneous coronary intervention)", "concept_display": "Percutaneous coronary intervention", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which percutaneous coronary intervention claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Percutaneous coronary intervention)", "concept_display": "Percutaneous coronary intervention", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's evaluation procedure approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Evaluation procedure (procedure))", "concept_display": "Evaluation procedure (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many evaluation procedure claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Evaluation procedure (procedure))", "concept_display": "Evaluation procedure (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving evaluation procedure?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Evaluation procedure (procedure))", "concept_display": "Evaluation procedure (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which evaluation procedure claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Evaluation procedure (procedure))", "concept_display": "Evaluation procedure (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's sealant per tooth approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: sealant per tooth)", "concept_display": "sealant per tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many sealant per tooth claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: sealant per tooth)", "concept_display": "sealant per tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving sealant per tooth?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: sealant per tooth)", "concept_display": "sealant per tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which sealant per tooth claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: sealant per tooth)", "concept_display": "sealant per tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's referral to cardiac surgery service approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Referral to cardiac surgery service (procedure))", "concept_display": "Referral to cardiac surgery service (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many referral to cardiac surgery service claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Referral to cardiac surgery service (procedure))", "concept_display": "Referral to cardiac surgery service (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving referral to cardiac surgery service?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Referral to cardiac surgery service (procedure))", "concept_display": "Referral to cardiac surgery service (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which referral to cardiac surgery service claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Referral to cardiac surgery service (procedure))", "concept_display": "Referral to cardiac surgery service (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's intubation approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Intubation (procedure))", "concept_display": "Intubation (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many intubation claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Intubation (procedure))", "concept_display": "Intubation (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving intubation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Intubation (procedure))", "concept_display": "Intubation (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which intubation claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Intubation (procedure))", "concept_display": "Intubation (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's intraoral comprehensive series of radiographic images approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: intraoral comprehensive series of radiographic images)", "concept_display": "intraoral comprehensive series of radiographic images", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many intraoral comprehensive series of radiographic images claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: intraoral comprehensive series of radiographic images)", "concept_display": "intraoral comprehensive series of radiographic images", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving intraoral comprehensive series of radiographic images?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: intraoral comprehensive series of radiographic images)", "concept_display": "intraoral comprehensive series of radiographic images", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which intraoral comprehensive series of radiographic images claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: intraoral comprehensive series of radiographic images)", "concept_display": "intraoral comprehensive series of radiographic images", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's other oral pathology procedures by report approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: other oral pathology procedures by report)", "concept_display": "other oral pathology procedures by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many other oral pathology procedures by report claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: other oral pathology procedures by report)", "concept_display": "other oral pathology procedures by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving other oral pathology procedures by report?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: other oral pathology procedures by report)", "concept_display": "other oral pathology procedures by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which other oral pathology procedures by report claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: other oral pathology procedures by report)", "concept_display": "other oral pathology procedures by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's digital examination of rectum approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digital examination of rectum (procedure))", "concept_display": "Digital examination of rectum (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many digital examination of rectum claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digital examination of rectum (procedure))", "concept_display": "Digital examination of rectum (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving digital examination of rectum?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digital examination of rectum (procedure))", "concept_display": "Digital examination of rectum (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which digital examination of rectum claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digital examination of rectum (procedure))", "concept_display": "Digital examination of rectum (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's bone replacement graft for ridge preservation per site approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: bone replacement graft for ridge preservation per site)", "concept_display": "bone replacement graft for ridge preservation per site", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many bone replacement graft for ridge preservation per site claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: bone replacement graft for ridge preservation per site)", "concept_display": "bone replacement graft for ridge preservation per site", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving bone replacement graft for ridge preservation per site?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: bone replacement graft for ridge preservation per site)", "concept_display": "bone replacement graft for ridge preservation per site", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which bone replacement graft for ridge preservation per site claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: bone replacement graft for ridge preservation per site)", "concept_display": "bone replacement graft for ridge preservation per site", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's physical examination, complete approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Physical examination, complete (procedure))", "concept_display": "Physical examination, complete (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many physical examination, complete claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Physical examination, complete (procedure))", "concept_display": "Physical examination, complete (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving physical examination, complete?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Physical examination, complete (procedure))", "concept_display": "Physical examination, complete (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which physical examination, complete claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Physical examination, complete (procedure))", "concept_display": "Physical examination, complete (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's incisional biopsy of oral tissue-hard (bone, tooth) approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: incisional biopsy of oral tissue-hard (bone, tooth))", "concept_display": "incisional biopsy of oral tissue-hard (bone, tooth)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many incisional biopsy of oral tissue-hard (bone, tooth) claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: incisional biopsy of oral tissue-hard (bone, tooth))", "concept_display": "incisional biopsy of oral tissue-hard (bone, tooth)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving incisional biopsy of oral tissue-hard (bone, tooth)?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: incisional biopsy of oral tissue-hard (bone, tooth))", "concept_display": "incisional biopsy of oral tissue-hard (bone, tooth)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which incisional biopsy of oral tissue-hard (bone, tooth) claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: incisional biopsy of oral tissue-hard (bone, tooth))", "concept_display": "incisional biopsy of oral tissue-hard (bone, tooth)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's electroencephalogram approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Electroencephalogram (procedure))", "concept_display": "Electroencephalogram (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many electroencephalogram claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Electroencephalogram (procedure))", "concept_display": "Electroencephalogram (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving electroencephalogram?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Electroencephalogram (procedure))", "concept_display": "Electroencephalogram (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which electroencephalogram claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Electroencephalogram (procedure))", "concept_display": "Electroencephalogram (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's augmentation of labor approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Augmentation of labor (procedure))", "concept_display": "Augmentation of labor (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many augmentation of labor claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Augmentation of labor (procedure))", "concept_display": "Augmentation of labor (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving augmentation of labor?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Augmentation of labor (procedure))", "concept_display": "Augmentation of labor (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which augmentation of labor claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Augmentation of labor (procedure))", "concept_display": "Augmentation of labor (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's admission to intensive care unit approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Admission to intensive care unit (procedure))", "concept_display": "Admission to intensive care unit (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many admission to intensive care unit claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Admission to intensive care unit (procedure))", "concept_display": "Admission to intensive care unit (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving admission to intensive care unit?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Admission to intensive care unit (procedure))", "concept_display": "Admission to intensive care unit (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which admission to intensive care unit claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Admission to intensive care unit (procedure))", "concept_display": "Admission to intensive care unit (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's premature birth of newborn approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Premature birth of newborn (finding))", "concept_display": "Premature birth of newborn (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many premature birth of newborn claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Premature birth of newborn (finding))", "concept_display": "Premature birth of newborn (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving premature birth of newborn?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Premature birth of newborn (finding))", "concept_display": "Premature birth of newborn (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which premature birth of newborn claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Premature birth of newborn (finding))", "concept_display": "Premature birth of newborn (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's biopsy of breast approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Biopsy of breast (procedure))", "concept_display": "Biopsy of breast (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many biopsy of breast claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Biopsy of breast (procedure))", "concept_display": "Biopsy of breast (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving biopsy of breast?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Biopsy of breast (procedure))", "concept_display": "Biopsy of breast (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which biopsy of breast claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Biopsy of breast (procedure))", "concept_display": "Biopsy of breast (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's complete blood count approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Complete blood count (procedure))", "concept_display": "Complete blood count (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many complete blood count claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Complete blood count (procedure))", "concept_display": "Complete blood count (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving complete blood count?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Complete blood count (procedure))", "concept_display": "Complete blood count (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which complete blood count claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Complete blood count (procedure))", "concept_display": "Complete blood count (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's unspecified removable prosthodontic procedure by report approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: unspecified removable prosthodontic procedure by report)", "concept_display": "unspecified removable prosthodontic procedure by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many unspecified removable prosthodontic procedure by report claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: unspecified removable prosthodontic procedure by report)", "concept_display": "unspecified removable prosthodontic procedure by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving unspecified removable prosthodontic procedure by report?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: unspecified removable prosthodontic procedure by report)", "concept_display": "unspecified removable prosthodontic procedure by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which unspecified removable prosthodontic procedure by report claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: unspecified removable prosthodontic procedure by report)", "concept_display": "unspecified removable prosthodontic procedure by report", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's chemotherapy approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chemotherapy (procedure))", "concept_display": "Chemotherapy (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many chemotherapy claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chemotherapy (procedure))", "concept_display": "Chemotherapy (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving chemotherapy?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chemotherapy (procedure))", "concept_display": "Chemotherapy (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which chemotherapy claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chemotherapy (procedure))", "concept_display": "Chemotherapy (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's protective restoration approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: protective restoration)", "concept_display": "protective restoration", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many protective restoration claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: protective restoration)", "concept_display": "protective restoration", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving protective restoration?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: protective restoration)", "concept_display": "protective restoration", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which protective restoration claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: protective restoration)", "concept_display": "protective restoration", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's treatment failure risk education approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Treatment failure risk education (procedure))", "concept_display": "Treatment failure risk education (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many treatment failure risk education claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Treatment failure risk education (procedure))", "concept_display": "Treatment failure risk education (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving treatment failure risk education?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Treatment failure risk education (procedure))", "concept_display": "Treatment failure risk education (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which treatment failure risk education claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Treatment failure risk education (procedure))", "concept_display": "Treatment failure risk education (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's prefabricated resin crown approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prefabricated resin crown)", "concept_display": "prefabricated resin crown", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many prefabricated resin crown claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prefabricated resin crown)", "concept_display": "prefabricated resin crown", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving prefabricated resin crown?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prefabricated resin crown)", "concept_display": "prefabricated resin crown", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which prefabricated resin crown claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prefabricated resin crown)", "concept_display": "prefabricated resin crown", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Was the claim for this patient's closed reduction of mandibular fracture approved or rejected?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Closed reduction of mandibular fracture (procedure))", "concept_display": "Closed reduction of mandibular fracture (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "hospital_ceo", "question": "How many closed reduction of mandibular fracture claims are still pending with the insurer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Closed reduction of mandibular fracture (procedure))", "concept_display": "Closed reduction of mandibular fracture (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "What's the denial rate on claims involving closed reduction of mandibular fracture?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Closed reduction of mandibular fracture (procedure))", "concept_display": "Closed reduction of mandibular fracture (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_claim_status", "tier": 5, "persona": "finance_reviewer", "question": "Which closed reduction of mandibular fracture claims were resubmitted after rejection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Closed reduction of mandibular fracture (procedure))", "concept_display": "Closed reduction of mandibular fracture (procedure)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's gingivitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on gingivitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding gingivitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about gingivitis in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Gingivitis (disorder))", "concept_display": "Gingivitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's social isolation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on social isolation.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding social isolation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about social isolation in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Social isolation (finding))", "concept_display": "Social isolation (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's victim of intimate partner abuse?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on victim of intimate partner abuse.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding victim of intimate partner abuse?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about victim of intimate partner abuse in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Victim of intimate partner abuse (finding))", "concept_display": "Victim of intimate partner abuse (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's anemia?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on anemia.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding anemia?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about anemia in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Anemia (disorder))", "concept_display": "Anemia (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's essential hypertension?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on essential hypertension.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding essential hypertension?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about essential hypertension in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Essential hypertension (disorder))", "concept_display": "Essential hypertension (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's chronic pain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on chronic pain.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding chronic pain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about chronic pain in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Chronic pain (finding))", "concept_display": "Chronic pain (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's metabolic syndrome X?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on metabolic syndrome X.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding metabolic syndrome X?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about metabolic syndrome X in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Metabolic syndrome X (disorder))", "concept_display": "Metabolic syndrome X (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on fracture of bone.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about fracture of bone in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of bone (disorder))", "concept_display": "Fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's disorder of kidney due to diabetes mellitus?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on disorder of kidney due to diabetes mellitus.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding disorder of kidney due to diabetes mellitus?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about disorder of kidney due to diabetes mellitus in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Disorder of kidney due to diabetes mellitus (disorder))", "concept_display": "Disorder of kidney due to diabetes mellitus (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's sprain (morphologic abnormality)?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on sprain (morphologic abnormality).", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding sprain (morphologic abnormality)?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about sprain (morphologic abnormality) in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain (morphologic abnormality))", "concept_display": "Sprain (morphologic abnormality)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's housing unsatisfactory?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on housing unsatisfactory.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding housing unsatisfactory?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about housing unsatisfactory in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Housing unsatisfactory (finding))", "concept_display": "Housing unsatisfactory (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's history of coronary artery bypass grafting?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on history of coronary artery bypass grafting.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding history of coronary artery bypass grafting?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about history of coronary artery bypass grafting in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of coronary artery bypass grafting (situation))", "concept_display": "History of coronary artery bypass grafting (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's history of tubal ligation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on history of tubal ligation.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding history of tubal ligation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about history of tubal ligation in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of tubal ligation (situation))", "concept_display": "History of tubal ligation (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's sprain of ankle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on sprain of ankle.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding sprain of ankle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about sprain of ankle in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of ankle (disorder))", "concept_display": "Sprain of ankle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's acute infective cystitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on acute infective cystitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding acute infective cystitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about acute infective cystitis in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acute infective cystitis (disorder))", "concept_display": "Acute infective cystitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's transport problem?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on transport problem.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding transport problem?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about transport problem in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Transport problem (finding))", "concept_display": "Transport problem (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's history of myocardial infarction?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on history of myocardial infarction.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding history of myocardial infarction?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about history of myocardial infarction in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of myocardial infarction (situation))", "concept_display": "History of myocardial infarction (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's concussion injury of brain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on concussion injury of brain.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding concussion injury of brain?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about concussion injury of brain in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Concussion injury of brain (disorder))", "concept_display": "Concussion injury of brain (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's serving in military service?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on serving in military service.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding serving in military service?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about serving in military service in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Serving in military service (finding))", "concept_display": "Serving in military service (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's sinusitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on sinusitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding sinusitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about sinusitis in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sinusitis (disorder))", "concept_display": "Sinusitis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's awaiting transplantation of kidney?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on awaiting transplantation of kidney.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding awaiting transplantation of kidney?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about awaiting transplantation of kidney in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Awaiting transplantation of kidney (situation))", "concept_display": "Awaiting transplantation of kidney (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's cough?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on cough.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding cough?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about cough in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cough (finding))", "concept_display": "Cough (finding)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's sleep disorder?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on sleep disorder.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding sleep disorder?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about sleep disorder in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sleep disorder (disorder))", "concept_display": "Sleep disorder (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's history of appendectomy?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on history of appendectomy.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding history of appendectomy?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about history of appendectomy in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: History of appendectomy (situation))", "concept_display": "History of appendectomy (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's whiplash injury to neck?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on whiplash injury to neck.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding whiplash injury to neck?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about whiplash injury to neck in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Whiplash injury to neck (disorder))", "concept_display": "Whiplash injury to neck (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's sprain of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on sprain of wrist.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding sprain of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about sprain of wrist in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sprain of wrist (disorder))", "concept_display": "Sprain of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's fracture of clavicle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on fracture of clavicle.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding fracture of clavicle?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about fracture of clavicle in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture of clavicle (disorder))", "concept_display": "Fracture of clavicle (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's sepsis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on sepsis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding sepsis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about sepsis in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sepsis (disorder))", "concept_display": "Sepsis (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's obstructive sleep apnea syndrome?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on obstructive sleep apnea syndrome.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding obstructive sleep apnea syndrome?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about obstructive sleep apnea syndrome in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Obstructive sleep apnea syndrome (disorder))", "concept_display": "Obstructive sleep apnea syndrome (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's recurrent rectal polyp?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on recurrent rectal polyp.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding recurrent rectal polyp?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about recurrent rectal polyp in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Recurrent rectal polyp (disorder))", "concept_display": "Recurrent rectal polyp (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's fracture subluxation of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on fracture subluxation of wrist.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding fracture subluxation of wrist?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about fracture subluxation of wrist in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Fracture subluxation of wrist (disorder))", "concept_display": "Fracture subluxation of wrist (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's laceration of foot?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on laceration of foot.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding laceration of foot?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about laceration of foot in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Laceration of foot (disorder))", "concept_display": "Laceration of foot (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's neoplasm of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on neoplasm of prostate.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding neoplasm of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about neoplasm of prostate in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Neoplasm of prostate (disorder))", "concept_display": "Neoplasm of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's osteoporotic fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on osteoporotic fracture of bone.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding osteoporotic fracture of bone?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about osteoporotic fracture of bone in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Osteoporotic fracture of bone (disorder))", "concept_display": "Osteoporotic fracture of bone (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's carcinoma in situ of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on carcinoma in situ of prostate.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding carcinoma in situ of prostate?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about carcinoma in situ of prostate in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Carcinoma in situ of prostate (disorder))", "concept_display": "Carcinoma in situ of prostate (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's cracked tooth?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on cracked tooth.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding cracked tooth?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about cracked tooth in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Cracked tooth)", "concept_display": "Cracked tooth", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's generalised chronic periodontitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on generalised chronic periodontitis.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding generalised chronic periodontitis?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about generalised chronic periodontitis in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Generalised chronic periodontitis)", "concept_display": "Generalised chronic periodontitis", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's childhood asthma?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on childhood asthma.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding childhood asthma?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about childhood asthma in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Childhood asthma (disorder))", "concept_display": "Childhood asthma (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's suspected prostate cancer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on suspected prostate cancer.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding suspected prostate cancer?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about suspected prostate cancer in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Suspected prostate cancer (situation))", "concept_display": "Suspected prostate cancer (situation)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What does the clinical note say about this patient's epidermal burn of skin?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "nurse", "question": "Summarize the discharge summary's notes on epidermal burn of skin.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "physician", "question": "What did the consulting note recommend regarding epidermal burn of skin?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_document_content", "tier": 5, "persona": "population_health_analyst", "question": "What free-text details exist about epidermal burn of skin in the clinical documentation?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Epidermal burn of skin (disorder))", "concept_display": "Epidermal burn of skin (disorder)", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was acetaminophen 325 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the acetaminophen 325 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the acetaminophen 325 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the acetaminophen 325 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was naproxen sodium 220 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the naproxen sodium 220 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the naproxen sodium 220 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the naproxen sodium 220 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was hydrochlorothiazide 25 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the hydrochlorothiazide 25 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the hydrochlorothiazide 25 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the hydrochlorothiazide 25 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was amLODIPine 2.5 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the amLODIPine 2.5 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the amLODIPine 2.5 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the amLODIPine 2.5 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was acetaminophen 160 MG Chewable Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the acetaminophen 160 MG Chewable Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the acetaminophen 160 MG Chewable Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the acetaminophen 160 MG Chewable Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was alendronic acid 10 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the alendronic acid 10 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the alendronic acid 10 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the alendronic acid 10 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was penicillin V Potassium 250 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the penicillin V Potassium 250 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the penicillin V Potassium 250 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the penicillin V Potassium 250 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was prasugrel 10 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the prasugrel 10 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the prasugrel 10 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the prasugrel 10 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was furosemide 40 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the furosemide 40 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the furosemide 40 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the furosemide 40 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was acetaminophen 325 MG Oral Tablet [Tylenol] actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the acetaminophen 325 MG Oral Tablet [Tylenol] dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the acetaminophen 325 MG Oral Tablet [Tylenol] dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the acetaminophen 325 MG Oral Tablet [Tylenol] order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was loratadine 5 MG Chewable Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the loratadine 5 MG Chewable Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the loratadine 5 MG Chewable Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the loratadine 5 MG Chewable Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was lisinopril 20 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the lisinopril 20 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the lisinopril 20 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the lisinopril 20 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was hydrocortisone 10 MG/ML Topical Cream actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the hydrocortisone 10 MG/ML Topical Cream dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the hydrocortisone 10 MG/ML Topical Cream dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the hydrocortisone 10 MG/ML Topical Cream order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was amoxicillin 250 MG Oral Capsule actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the amoxicillin 250 MG Oral Capsule dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the amoxicillin 250 MG Oral Capsule dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the amoxicillin 250 MG Oral Capsule order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was diphenhydrAMINE Hydrochloride 25 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the diphenhydrAMINE Hydrochloride 25 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the diphenhydrAMINE Hydrochloride 25 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the diphenhydrAMINE Hydrochloride 25 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was cetirizine hydrochloride 5 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the cetirizine hydrochloride 5 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the cetirizine hydrochloride 5 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the cetirizine hydrochloride 5 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was digoxin 0.125 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the digoxin 0.125 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the digoxin 0.125 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the digoxin 0.125 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was verapamil hydrochloride 80 MG Oral Tablet [Calan] actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the verapamil hydrochloride 80 MG Oral Tablet [Calan] dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the verapamil hydrochloride 80 MG Oral Tablet [Calan] dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the verapamil hydrochloride 80 MG Oral Tablet [Calan] order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was alteplase 100 MG Injection actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the alteplase 100 MG Injection dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the alteplase 100 MG Injection dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the alteplase 100 MG Injection order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was atorvastatin 40 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the atorvastatin 40 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the atorvastatin 40 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the atorvastatin 40 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was budesonide 0.25 MG/ML Inhalation Suspension actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the budesonide 0.25 MG/ML Inhalation Suspension dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the budesonide 0.25 MG/ML Inhalation Suspension dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the budesonide 0.25 MG/ML Inhalation Suspension order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was levothyroxine Sodium 0.075 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the levothyroxine Sodium 0.075 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the levothyroxine Sodium 0.075 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the levothyroxine Sodium 0.075 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was naproxen 500 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the naproxen 500 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the naproxen 500 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the naproxen 500 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was atorvastatin 10 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the atorvastatin 10 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the atorvastatin 10 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the atorvastatin 10 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was mestranol / Norethynodrel actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the mestranol / Norethynodrel dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the mestranol / Norethynodrel dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the mestranol / Norethynodrel order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was losartan potassium 100 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the losartan potassium 100 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the losartan potassium 100 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the losartan potassium 100 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was atorvastatin 80 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the atorvastatin 80 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the atorvastatin 80 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the atorvastatin 80 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was metoprolol tartrate 50 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the metoprolol tartrate 50 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the metoprolol tartrate 50 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the metoprolol tartrate 50 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was sertraline 100 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sertraline 100 MG Oral Tablet)", "concept_display": "Sertraline 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the sertraline 100 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sertraline 100 MG Oral Tablet)", "concept_display": "Sertraline 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the sertraline 100 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sertraline 100 MG Oral Tablet)", "concept_display": "Sertraline 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the sertraline 100 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Sertraline 100 MG Oral Tablet)", "concept_display": "Sertraline 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was atenolol 25 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 25 MG Oral Tablet)", "concept_display": "atenolol 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the atenolol 25 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 25 MG Oral Tablet)", "concept_display": "atenolol 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the atenolol 25 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 25 MG Oral Tablet)", "concept_display": "atenolol 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the atenolol 25 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 25 MG Oral Tablet)", "concept_display": "atenolol 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was amoxicillin 500 MG / clavulanate 125 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amoxicillin 500 MG / clavulanate 125 MG Oral Tablet)", "concept_display": "amoxicillin 500 MG / clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the amoxicillin 500 MG / clavulanate 125 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amoxicillin 500 MG / clavulanate 125 MG Oral Tablet)", "concept_display": "amoxicillin 500 MG / clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the amoxicillin 500 MG / clavulanate 125 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amoxicillin 500 MG / clavulanate 125 MG Oral Tablet)", "concept_display": "amoxicillin 500 MG / clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the amoxicillin 500 MG / clavulanate 125 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amoxicillin 500 MG / clavulanate 125 MG Oral Tablet)", "concept_display": "amoxicillin 500 MG / clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was atenolol 50 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 50 MG Oral Tablet)", "concept_display": "atenolol 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the atenolol 50 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 50 MG Oral Tablet)", "concept_display": "atenolol 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the atenolol 50 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 50 MG Oral Tablet)", "concept_display": "atenolol 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the atenolol 50 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atenolol 50 MG Oral Tablet)", "concept_display": "atenolol 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet)", "concept_display": "buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet)", "concept_display": "buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet)", "concept_display": "buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet)", "concept_display": "buprenorphine 2 MG / naloxone 0.5 MG Sublingual Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was pravastatin sodium 40 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: pravastatin sodium 40 MG Oral Tablet)", "concept_display": "pravastatin sodium 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the pravastatin sodium 40 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: pravastatin sodium 40 MG Oral Tablet)", "concept_display": "pravastatin sodium 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the pravastatin sodium 40 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: pravastatin sodium 40 MG Oral Tablet)", "concept_display": "pravastatin sodium 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the pravastatin sodium 40 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: pravastatin sodium 40 MG Oral Tablet)", "concept_display": "pravastatin sodium 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was donepezil hydrochloride 23 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 23 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 23 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the donepezil hydrochloride 23 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 23 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 23 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the donepezil hydrochloride 23 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 23 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 23 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the donepezil hydrochloride 23 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 23 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 23 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Was donepezil hydrochloride 10 MG Oral Tablet actually administered to the patient, and at what time?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 10 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Confirm whether the donepezil hydrochloride 10 MG Oral Tablet dose was given as ordered, not just prescribed.", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 10 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "nurse", "question": "Which nurse administered the donepezil hydrochloride 10 MG Oral Tablet dose?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 10 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_medication_administration_actual", "tier": 5, "persona": "pharmacist", "question": "Was there a discrepancy between the donepezil hydrochloride 10 MG Oral Tablet order and what was actually given?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Donepezil hydrochloride 10 MG Oral Tablet)", "concept_display": "Donepezil hydrochloride 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of acetaminophen 325 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for acetaminophen 325 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder acetaminophen 325 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many acetaminophen 325 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet)", "concept_display": "Acetaminophen 325 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of naproxen sodium 220 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for naproxen sodium 220 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder naproxen sodium 220 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many naproxen sodium 220 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen sodium 220 MG Oral Tablet)", "concept_display": "Naproxen sodium 220 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet)", "concept_display": "Amoxicillin 250 MG / Clavulanate 125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of hydrochlorothiazide 25 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for hydrochlorothiazide 25 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder hydrochlorothiazide 25 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many hydrochlorothiazide 25 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrochlorothiazide 25 MG Oral Tablet)", "concept_display": "Hydrochlorothiazide 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of amLODIPine 2.5 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for amLODIPine 2.5 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder amLODIPine 2.5 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many amLODIPine 2.5 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: amLODIPine 2.5 MG Oral Tablet)", "concept_display": "amLODIPine 2.5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of acetaminophen 160 MG Chewable Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for acetaminophen 160 MG Chewable Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder acetaminophen 160 MG Chewable Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many acetaminophen 160 MG Chewable Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 160 MG Chewable Tablet)", "concept_display": "Acetaminophen 160 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector)", "concept_display": "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of alendronic acid 10 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for alendronic acid 10 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder alendronic acid 10 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many alendronic acid 10 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alendronic acid 10 MG Oral Tablet)", "concept_display": "Alendronic acid 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of penicillin V Potassium 250 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for penicillin V Potassium 250 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder penicillin V Potassium 250 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many penicillin V Potassium 250 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Penicillin V Potassium 250 MG Oral Tablet)", "concept_display": "Penicillin V Potassium 250 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of prasugrel 10 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for prasugrel 10 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder prasugrel 10 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many prasugrel 10 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: prasugrel 10 MG Oral Tablet)", "concept_display": "prasugrel 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of furosemide 40 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for furosemide 40 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder furosemide 40 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many furosemide 40 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Furosemide 40 MG Oral Tablet)", "concept_display": "Furosemide 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of acetaminophen 325 MG Oral Tablet [Tylenol] do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for acetaminophen 325 MG Oral Tablet [Tylenol]?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder acetaminophen 325 MG Oral Tablet [Tylenol] based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many acetaminophen 325 MG Oral Tablet [Tylenol] units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Acetaminophen 325 MG Oral Tablet [Tylenol])", "concept_display": "Acetaminophen 325 MG Oral Tablet [Tylenol]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of loratadine 5 MG Chewable Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for loratadine 5 MG Chewable Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder loratadine 5 MG Chewable Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many loratadine 5 MG Chewable Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Loratadine 5 MG Chewable Tablet)", "concept_display": "Loratadine 5 MG Chewable Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of lisinopril 20 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for lisinopril 20 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder lisinopril 20 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many lisinopril 20 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: lisinopril 20 MG Oral Tablet)", "concept_display": "lisinopril 20 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of hydrocortisone 10 MG/ML Topical Cream do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for hydrocortisone 10 MG/ML Topical Cream?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder hydrocortisone 10 MG/ML Topical Cream based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many hydrocortisone 10 MG/ML Topical Cream units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Hydrocortisone 10 MG/ML Topical Cream)", "concept_display": "Hydrocortisone 10 MG/ML Topical Cream", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of amoxicillin 250 MG Oral Capsule do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for amoxicillin 250 MG Oral Capsule?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder amoxicillin 250 MG Oral Capsule based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many amoxicillin 250 MG Oral Capsule units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Amoxicillin 250 MG Oral Capsule)", "concept_display": "Amoxicillin 250 MG Oral Capsule", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of diphenhydrAMINE Hydrochloride 25 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for diphenhydrAMINE Hydrochloride 25 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder diphenhydrAMINE Hydrochloride 25 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many diphenhydrAMINE Hydrochloride 25 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: diphenhydrAMINE Hydrochloride 25 MG Oral Tablet)", "concept_display": "diphenhydrAMINE Hydrochloride 25 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of cetirizine hydrochloride 5 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for cetirizine hydrochloride 5 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder cetirizine hydrochloride 5 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many cetirizine hydrochloride 5 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: cetirizine hydrochloride 5 MG Oral Tablet)", "concept_display": "cetirizine hydrochloride 5 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of digoxin 0.125 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for digoxin 0.125 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder digoxin 0.125 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many digoxin 0.125 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Digoxin 0.125 MG Oral Tablet)", "concept_display": "Digoxin 0.125 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of verapamil hydrochloride 80 MG Oral Tablet [Calan] do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for verapamil hydrochloride 80 MG Oral Tablet [Calan]?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder verapamil hydrochloride 80 MG Oral Tablet [Calan] based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many verapamil hydrochloride 80 MG Oral Tablet [Calan] units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: verapamil hydrochloride 80 MG Oral Tablet [Calan])", "concept_display": "verapamil hydrochloride 80 MG Oral Tablet [Calan]", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of alteplase 100 MG Injection do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for alteplase 100 MG Injection?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder alteplase 100 MG Injection based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many alteplase 100 MG Injection units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Alteplase 100 MG Injection)", "concept_display": "Alteplase 100 MG Injection", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of atorvastatin 40 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for atorvastatin 40 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder atorvastatin 40 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many atorvastatin 40 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 40 MG Oral Tablet)", "concept_display": "atorvastatin 40 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of budesonide 0.25 MG/ML Inhalation Suspension do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for budesonide 0.25 MG/ML Inhalation Suspension?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder budesonide 0.25 MG/ML Inhalation Suspension based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many budesonide 0.25 MG/ML Inhalation Suspension units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: budesonide 0.25 MG/ML Inhalation Suspension)", "concept_display": "budesonide 0.25 MG/ML Inhalation Suspension", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of levothyroxine Sodium 0.075 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for levothyroxine Sodium 0.075 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder levothyroxine Sodium 0.075 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many levothyroxine Sodium 0.075 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Levothyroxine Sodium 0.075 MG Oral Tablet)", "concept_display": "Levothyroxine Sodium 0.075 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of naproxen 500 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for naproxen 500 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder naproxen 500 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many naproxen 500 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Naproxen 500 MG Oral Tablet)", "concept_display": "Naproxen 500 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of atorvastatin 10 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for atorvastatin 10 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder atorvastatin 10 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many atorvastatin 10 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 10 MG Oral Tablet)", "concept_display": "atorvastatin 10 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of mestranol / Norethynodrel do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for mestranol / Norethynodrel?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder mestranol / Norethynodrel based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many mestranol / Norethynodrel units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: Mestranol / Norethynodrel)", "concept_display": "Mestranol / Norethynodrel", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of losartan potassium 100 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for losartan potassium 100 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder losartan potassium 100 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many losartan potassium 100 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: losartan potassium 100 MG Oral Tablet)", "concept_display": "losartan potassium 100 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of atorvastatin 80 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for atorvastatin 80 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder atorvastatin 80 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many atorvastatin 80 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: atorvastatin 80 MG Oral Tablet)", "concept_display": "atorvastatin 80 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many units of metoprolol tartrate 50 MG Oral Tablet do we currently have in pharmacy stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory level for metoprolol tartrate 50 MG Oral Tablet?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "Do we need to reorder metoprolol tartrate 50 MG Oral Tablet based on current stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_pharmacy_stock", "tier": 5, "persona": "pharmacist", "question": "How many metoprolol tartrate 50 MG Oral Tablet units were used from inventory this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "billing/document/administration/inventory data not in schema (instance: metoprolol tartrate 50 MG Oral Tablet)", "concept_display": "metoprolol tartrate 50 MG Oral Tablet", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a pacemaker implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pacemaker)", "concept_display": "pacemaker", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a pacemaker?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pacemaker)", "concept_display": "pacemaker", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the pacemaker implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pacemaker)", "concept_display": "pacemaker", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a pacemaker.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pacemaker)", "concept_display": "pacemaker", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a cochlear implant implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cochlear implant)", "concept_display": "cochlear implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a cochlear implant?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cochlear implant)", "concept_display": "cochlear implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the cochlear implant implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cochlear implant)", "concept_display": "cochlear implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a cochlear implant.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cochlear implant)", "concept_display": "cochlear implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have an artificial hip implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial hip)", "concept_display": "artificial hip", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have an artificial hip?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial hip)", "concept_display": "artificial hip", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the artificial hip implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial hip)", "concept_display": "artificial hip", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have an artificial hip.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial hip)", "concept_display": "artificial hip", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a coronary stent implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: coronary stent)", "concept_display": "coronary stent", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a coronary stent?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: coronary stent)", "concept_display": "coronary stent", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the coronary stent implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: coronary stent)", "concept_display": "coronary stent", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a coronary stent.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: coronary stent)", "concept_display": "coronary stent", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have an insulin pump implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: insulin pump)", "concept_display": "insulin pump", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have an insulin pump?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: insulin pump)", "concept_display": "insulin pump", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the insulin pump implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: insulin pump)", "concept_display": "insulin pump", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have an insulin pump.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: insulin pump)", "concept_display": "insulin pump", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have an implantable defibrillator implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: implantable defibrillator)", "concept_display": "implantable defibrillator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have an implantable defibrillator?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: implantable defibrillator)", "concept_display": "implantable defibrillator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the implantable defibrillator implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: implantable defibrillator)", "concept_display": "implantable defibrillator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have an implantable defibrillator.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: implantable defibrillator)", "concept_display": "implantable defibrillator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a prosthetic knee implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: prosthetic knee)", "concept_display": "prosthetic knee", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a prosthetic knee?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: prosthetic knee)", "concept_display": "prosthetic knee", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the prosthetic knee implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: prosthetic knee)", "concept_display": "prosthetic knee", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a prosthetic knee.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: prosthetic knee)", "concept_display": "prosthetic knee", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a dental implant implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dental implant)", "concept_display": "dental implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a dental implant?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dental implant)", "concept_display": "dental implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the dental implant implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dental implant)", "concept_display": "dental implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a dental implant.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dental implant)", "concept_display": "dental implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have an intrauterine device implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intrauterine device)", "concept_display": "intrauterine device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have an intrauterine device?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intrauterine device)", "concept_display": "intrauterine device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the intrauterine device implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intrauterine device)", "concept_display": "intrauterine device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have an intrauterine device.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intrauterine device)", "concept_display": "intrauterine device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a hearing aid implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: hearing aid)", "concept_display": "hearing aid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a hearing aid?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: hearing aid)", "concept_display": "hearing aid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the hearing aid implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: hearing aid)", "concept_display": "hearing aid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a hearing aid.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: hearing aid)", "concept_display": "hearing aid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a spinal fusion hardware implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: spinal fusion hardware)", "concept_display": "spinal fusion hardware", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a spinal fusion hardware?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: spinal fusion hardware)", "concept_display": "spinal fusion hardware", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the spinal fusion hardware implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: spinal fusion hardware)", "concept_display": "spinal fusion hardware", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a spinal fusion hardware.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: spinal fusion hardware)", "concept_display": "spinal fusion hardware", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a breast implant implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: breast implant)", "concept_display": "breast implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a breast implant?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: breast implant)", "concept_display": "breast implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the breast implant implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: breast implant)", "concept_display": "breast implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a breast implant.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: breast implant)", "concept_display": "breast implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a ventricular assist device implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ventricular assist device)", "concept_display": "ventricular assist device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a ventricular assist device?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ventricular assist device)", "concept_display": "ventricular assist device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the ventricular assist device implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ventricular assist device)", "concept_display": "ventricular assist device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a ventricular assist device.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ventricular assist device)", "concept_display": "ventricular assist device", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have an arterial graft implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: arterial graft)", "concept_display": "arterial graft", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have an arterial graft?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: arterial graft)", "concept_display": "arterial graft", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the arterial graft implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: arterial graft)", "concept_display": "arterial graft", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have an arterial graft.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: arterial graft)", "concept_display": "arterial graft", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a corneal implant implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: corneal implant)", "concept_display": "corneal implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a corneal implant?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: corneal implant)", "concept_display": "corneal implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the corneal implant implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: corneal implant)", "concept_display": "corneal implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a corneal implant.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: corneal implant)", "concept_display": "corneal implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a penile implant implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: penile implant)", "concept_display": "penile implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a penile implant?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: penile implant)", "concept_display": "penile implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the penile implant implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: penile implant)", "concept_display": "penile implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a penile implant.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: penile implant)", "concept_display": "penile implant", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have an orthopedic screw implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedic screw)", "concept_display": "orthopedic screw", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have an orthopedic screw?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedic screw)", "concept_display": "orthopedic screw", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the orthopedic screw implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedic screw)", "concept_display": "orthopedic screw", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have an orthopedic screw.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedic screw)", "concept_display": "orthopedic screw", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a gastric band implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: gastric band)", "concept_display": "gastric band", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a gastric band?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: gastric band)", "concept_display": "gastric band", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the gastric band implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: gastric band)", "concept_display": "gastric band", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a gastric band.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: gastric band)", "concept_display": "gastric band", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have an artificial heart valve implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial heart valve)", "concept_display": "artificial heart valve", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have an artificial heart valve?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial heart valve)", "concept_display": "artificial heart valve", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the artificial heart valve implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial heart valve)", "concept_display": "artificial heart valve", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have an artificial heart valve.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: artificial heart valve)", "concept_display": "artificial heart valve", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "Does this patient have a nerve stimulator implanted?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: nerve stimulator)", "concept_display": "nerve stimulator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "nurse", "question": "How many of our patients currently have a nerve stimulator?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: nerve stimulator)", "concept_display": "nerve stimulator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "physician", "question": "When was the nerve stimulator implanted, and by which surgeon?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: nerve stimulator)", "concept_display": "nerve stimulator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_device_implanted", "tier": 5, "persona": "population_health_analyst", "question": "Break down patients by whether they have a nerve stimulator.", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: nerve stimulator)", "concept_display": "nerve stimulator", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Blue Cross Blue Shield?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Blue Cross Blue Shield)", "concept_display": "Blue Cross Blue Shield", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Blue Cross Blue Shield?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Blue Cross Blue Shield)", "concept_display": "Blue Cross Blue Shield", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Blue Cross Blue Shield policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Blue Cross Blue Shield)", "concept_display": "Blue Cross Blue Shield", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Blue Cross Blue Shield?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Blue Cross Blue Shield)", "concept_display": "Blue Cross Blue Shield", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Aetna?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Aetna)", "concept_display": "Aetna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Aetna?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Aetna)", "concept_display": "Aetna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Aetna policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Aetna)", "concept_display": "Aetna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Aetna?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Aetna)", "concept_display": "Aetna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by UnitedHealthcare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: UnitedHealthcare)", "concept_display": "UnitedHealthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through UnitedHealthcare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: UnitedHealthcare)", "concept_display": "UnitedHealthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's UnitedHealthcare policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: UnitedHealthcare)", "concept_display": "UnitedHealthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from UnitedHealthcare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: UnitedHealthcare)", "concept_display": "UnitedHealthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Cigna?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Cigna)", "concept_display": "Cigna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Cigna?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Cigna)", "concept_display": "Cigna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Cigna policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Cigna)", "concept_display": "Cigna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Cigna?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Cigna)", "concept_display": "Cigna", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Daman?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Daman)", "concept_display": "Daman", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Daman?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Daman)", "concept_display": "Daman", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Daman policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Daman)", "concept_display": "Daman", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Daman?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Daman)", "concept_display": "Daman", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Medicare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicare)", "concept_display": "Medicare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Medicare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicare)", "concept_display": "Medicare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Medicare policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicare)", "concept_display": "Medicare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Medicare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicare)", "concept_display": "Medicare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Medicaid?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicaid)", "concept_display": "Medicaid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Medicaid?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicaid)", "concept_display": "Medicaid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Medicaid policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicaid)", "concept_display": "Medicaid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Medicaid?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Medicaid)", "concept_display": "Medicaid", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Humana?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Humana)", "concept_display": "Humana", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Humana?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Humana)", "concept_display": "Humana", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Humana policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Humana)", "concept_display": "Humana", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Humana?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Humana)", "concept_display": "Humana", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Kaiser Permanente?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Kaiser Permanente)", "concept_display": "Kaiser Permanente", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Kaiser Permanente?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Kaiser Permanente)", "concept_display": "Kaiser Permanente", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Kaiser Permanente policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Kaiser Permanente)", "concept_display": "Kaiser Permanente", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Kaiser Permanente?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Kaiser Permanente)", "concept_display": "Kaiser Permanente", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by AXA?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: AXA)", "concept_display": "AXA", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through AXA?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: AXA)", "concept_display": "AXA", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's AXA policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: AXA)", "concept_display": "AXA", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from AXA?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: AXA)", "concept_display": "AXA", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Bupa?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Bupa)", "concept_display": "Bupa", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Bupa?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Bupa)", "concept_display": "Bupa", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Bupa policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Bupa)", "concept_display": "Bupa", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Bupa?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Bupa)", "concept_display": "Bupa", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by MetLife?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: MetLife)", "concept_display": "MetLife", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through MetLife?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: MetLife)", "concept_display": "MetLife", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's MetLife policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: MetLife)", "concept_display": "MetLife", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from MetLife?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: MetLife)", "concept_display": "MetLife", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Allianz?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Allianz)", "concept_display": "Allianz", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Allianz?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Allianz)", "concept_display": "Allianz", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Allianz policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Allianz)", "concept_display": "Allianz", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Allianz?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Allianz)", "concept_display": "Allianz", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Anthem?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Anthem)", "concept_display": "Anthem", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Anthem?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Anthem)", "concept_display": "Anthem", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Anthem policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Anthem)", "concept_display": "Anthem", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Anthem?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Anthem)", "concept_display": "Anthem", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "Is this patient covered by Molina Healthcare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Molina Healthcare)", "concept_display": "Molina Healthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "How many of our patients are insured through Molina Healthcare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Molina Healthcare)", "concept_display": "Molina Healthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "admission_clerk", "question": "What's this patient's Molina Healthcare policy number?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Molina Healthcare)", "concept_display": "Molina Healthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_insurance_payer", "tier": 5, "persona": "finance_reviewer", "question": "What's our reimbursement rate from Molina Healthcare?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: Molina Healthcare)", "concept_display": "Molina Healthcare", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the cardiology department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cardiology)", "concept_display": "cardiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to cardiology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cardiology)", "concept_display": "cardiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in cardiology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cardiology)", "concept_display": "cardiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the cardiology department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: cardiology)", "concept_display": "cardiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the radiology department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: radiology)", "concept_display": "radiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to radiology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: radiology)", "concept_display": "radiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in radiology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: radiology)", "concept_display": "radiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the radiology department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: radiology)", "concept_display": "radiology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the oncology department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oncology)", "concept_display": "oncology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to oncology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oncology)", "concept_display": "oncology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in oncology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oncology)", "concept_display": "oncology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the oncology department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oncology)", "concept_display": "oncology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the pediatrics department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pediatrics)", "concept_display": "pediatrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to pediatrics?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pediatrics)", "concept_display": "pediatrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in pediatrics?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pediatrics)", "concept_display": "pediatrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the pediatrics department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: pediatrics)", "concept_display": "pediatrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the emergency department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: emergency)", "concept_display": "emergency", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to emergency?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: emergency)", "concept_display": "emergency", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in emergency?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: emergency)", "concept_display": "emergency", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the emergency department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: emergency)", "concept_display": "emergency", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the intensive care department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intensive care)", "concept_display": "intensive care", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to intensive care?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intensive care)", "concept_display": "intensive care", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in intensive care?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intensive care)", "concept_display": "intensive care", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the intensive care department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: intensive care)", "concept_display": "intensive care", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the orthopedics department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedics)", "concept_display": "orthopedics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to orthopedics?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedics)", "concept_display": "orthopedics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in orthopedics?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedics)", "concept_display": "orthopedics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the orthopedics department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: orthopedics)", "concept_display": "orthopedics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the dermatology department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dermatology)", "concept_display": "dermatology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to dermatology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dermatology)", "concept_display": "dermatology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in dermatology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dermatology)", "concept_display": "dermatology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the dermatology department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: dermatology)", "concept_display": "dermatology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the neurology department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: neurology)", "concept_display": "neurology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to neurology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: neurology)", "concept_display": "neurology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in neurology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: neurology)", "concept_display": "neurology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the neurology department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: neurology)", "concept_display": "neurology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the psychiatry department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: psychiatry)", "concept_display": "psychiatry", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to psychiatry?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: psychiatry)", "concept_display": "psychiatry", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in psychiatry?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: psychiatry)", "concept_display": "psychiatry", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the psychiatry department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: psychiatry)", "concept_display": "psychiatry", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the obstetrics department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: obstetrics)", "concept_display": "obstetrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to obstetrics?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: obstetrics)", "concept_display": "obstetrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in obstetrics?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: obstetrics)", "concept_display": "obstetrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the obstetrics department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: obstetrics)", "concept_display": "obstetrics", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the urology department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urology)", "concept_display": "urology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to urology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urology)", "concept_display": "urology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in urology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urology)", "concept_display": "urology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the urology department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urology)", "concept_display": "urology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the ENT department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ENT)", "concept_display": "ENT", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to ENT?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ENT)", "concept_display": "ENT", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in ENT?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ENT)", "concept_display": "ENT", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the ENT department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ENT)", "concept_display": "ENT", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the ophthalmology department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ophthalmology)", "concept_display": "ophthalmology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to ophthalmology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ophthalmology)", "concept_display": "ophthalmology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in ophthalmology?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ophthalmology)", "concept_display": "ophthalmology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the ophthalmology department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: ophthalmology)", "concept_display": "ophthalmology", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How many patients are currently in the general surgery department?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: general surgery)", "concept_display": "general surgery", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "admission_clerk", "question": "Which patients are assigned to general surgery?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: general surgery)", "concept_display": "general surgery", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "finance_reviewer", "question": "What's the average length of stay for patients in general surgery?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: general surgery)", "concept_display": "general surgery", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_department_by_name", "tier": 5, "persona": "hospital_ceo", "question": "How is the general surgery department performing this quarter?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: general surgery)", "concept_display": "general surgery", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many surgical gauze do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gauze)", "concept_display": "surgical gauze", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for surgical gauze?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gauze)", "concept_display": "surgical gauze", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder surgical gauze?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gauze)", "concept_display": "surgical gauze", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many surgical gauze were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gauze)", "concept_display": "surgical gauze", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many syringes do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: syringes)", "concept_display": "syringes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for syringes?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: syringes)", "concept_display": "syringes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder syringes?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: syringes)", "concept_display": "syringes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many syringes were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: syringes)", "concept_display": "syringes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many IV bags do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV bags)", "concept_display": "IV bags", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for IV bags?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV bags)", "concept_display": "IV bags", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder IV bags?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV bags)", "concept_display": "IV bags", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many IV bags were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV bags)", "concept_display": "IV bags", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many surgical masks do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical masks)", "concept_display": "surgical masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for surgical masks?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical masks)", "concept_display": "surgical masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder surgical masks?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical masks)", "concept_display": "surgical masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many surgical masks were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical masks)", "concept_display": "surgical masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many examination gloves do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: examination gloves)", "concept_display": "examination gloves", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for examination gloves?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: examination gloves)", "concept_display": "examination gloves", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder examination gloves?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: examination gloves)", "concept_display": "examination gloves", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many examination gloves were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: examination gloves)", "concept_display": "examination gloves", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many sutures do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: sutures)", "concept_display": "sutures", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for sutures?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: sutures)", "concept_display": "sutures", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder sutures?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: sutures)", "concept_display": "sutures", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many sutures were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: sutures)", "concept_display": "sutures", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many urinary catheters do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urinary catheters)", "concept_display": "urinary catheters", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for urinary catheters?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urinary catheters)", "concept_display": "urinary catheters", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder urinary catheters?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urinary catheters)", "concept_display": "urinary catheters", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many urinary catheters were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: urinary catheters)", "concept_display": "urinary catheters", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many adhesive bandages do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: adhesive bandages)", "concept_display": "adhesive bandages", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for adhesive bandages?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: adhesive bandages)", "concept_display": "adhesive bandages", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder adhesive bandages?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: adhesive bandages)", "concept_display": "adhesive bandages", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many adhesive bandages were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: adhesive bandages)", "concept_display": "adhesive bandages", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many antiseptic wipes do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: antiseptic wipes)", "concept_display": "antiseptic wipes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for antiseptic wipes?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: antiseptic wipes)", "concept_display": "antiseptic wipes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder antiseptic wipes?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: antiseptic wipes)", "concept_display": "antiseptic wipes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many antiseptic wipes were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: antiseptic wipes)", "concept_display": "antiseptic wipes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many blood collection tubes do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: blood collection tubes)", "concept_display": "blood collection tubes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for blood collection tubes?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: blood collection tubes)", "concept_display": "blood collection tubes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder blood collection tubes?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: blood collection tubes)", "concept_display": "blood collection tubes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many blood collection tubes were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: blood collection tubes)", "concept_display": "blood collection tubes", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many surgical gowns do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gowns)", "concept_display": "surgical gowns", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for surgical gowns?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gowns)", "concept_display": "surgical gowns", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder surgical gowns?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gowns)", "concept_display": "surgical gowns", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many surgical gowns were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: surgical gowns)", "concept_display": "surgical gowns", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many N95 respirators do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: N95 respirators)", "concept_display": "N95 respirators", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for N95 respirators?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: N95 respirators)", "concept_display": "N95 respirators", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder N95 respirators?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: N95 respirators)", "concept_display": "N95 respirators", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many N95 respirators were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: N95 respirators)", "concept_display": "N95 respirators", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many wound dressings do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: wound dressings)", "concept_display": "wound dressings", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for wound dressings?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: wound dressings)", "concept_display": "wound dressings", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder wound dressings?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: wound dressings)", "concept_display": "wound dressings", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many wound dressings were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: wound dressings)", "concept_display": "wound dressings", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many IV cannulas do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV cannulas)", "concept_display": "IV cannulas", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for IV cannulas?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV cannulas)", "concept_display": "IV cannulas", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder IV cannulas?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV cannulas)", "concept_display": "IV cannulas", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many IV cannulas were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: IV cannulas)", "concept_display": "IV cannulas", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "pharmacist", "question": "How many oxygen masks do we have in stock?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oxygen masks)", "concept_display": "oxygen masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "What's our current inventory count for oxygen masks?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oxygen masks)", "concept_display": "oxygen masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "nurse", "question": "Do we need to reorder oxygen masks?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oxygen masks)", "concept_display": "oxygen masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}} {"archetype_id": "unans_supply_inventory", "tier": 5, "persona": "finance_reviewer", "question": "How many oxygen masks were used this month?", "schema_ref": "schema/schema.sql", "excluded_concept": "device/insurance/department/supply data not in schema (instance: oxygen masks)", "concept_display": "oxygen masks", "flags": [], "target": "{\n \"abstain\": true\n}\n\n```sql\nUNANSWERABLE\n```", "gold_sql": "UNANSWERABLE", "gold_plan": {"abstain": true}}