'Mark Diagnosis with a certain ICD-10 Code as main diagnosis

I would like to mark all diagnoses whose conceptId starts with "G35." as main diagnosis. How can I implement this?

d:Diagnosis{d.conceptId.startswith("G35.") -> MainDiagnosis}; 
d:Diagnosis{d.conceptId[0:3] == "G35." -> MainDiagnosis};

All the best Philipp



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source