101
0/304
Loading content...
A clinical data platform stores patient diagnosis tags as a space-separated code list. Analysts need a quick filter that identifies records with Type-1 diabetes-related codes.
Table: patients
Matching rule:
Task: Return all qualifying patients.
Output requirements:
Supported submission environments:
patients:
| patient_id | patient_name | conditions |
|------------|--------------|-----------------|
| 1 | Daniel | YFEV COUGH |
| 2 | Alice | |
| 3 | Bob | DIAB100 MYOP |
| 4 | George | ACNE DIAB100 |
| 5 | Alain | DIAB201 |[
{"patient_id":3,"patient_name":"Bob","conditions":"DIAB100 MYOP"},
{"patient_id":4,"patient_name":"George","conditions":"ACNE DIAB100"}
]Patients 3 and 4 each contain a diagnosis token that starts with DIAB1. Patient 5 has DIAB201, which does not match the required prefix.
patients:
| patient_id | patient_name | conditions |
|------------|--------------|--------------------|
| 10 | Iris | XDIAB100 ASTH01 |
| 11 | Noah | PREDIAB100 COUGH |
| 12 | Riya | ASTH01 FLU11 |[]No diagnosis token starts with DIAB1. Tokens that only contain DIAB1 as an internal substring are not valid matches.
patients:
| patient_id | patient_name | conditions |
|------------|--------------|---------------------------|
| 20 | Mina | DIAB10 |
| 21 | Owen | HBP22 DIAB1X RESP05 |
| 22 | Pia | NULL |
| 23 | Quinn | |[
{"patient_id":20,"patient_name":"Mina","conditions":"DIAB10"},
{"patient_id":21,"patient_name":"Owen","conditions":"HBP22 DIAB1X RESP05"}
]Both DIAB10 and DIAB1X begin with DIAB1, so those rows qualify. Null and empty condition strings do not qualify.
Constraints