Regarding Logic Description: Please see guidance here https://ohdsi.github.io/PhenotypeLibrary/articles/GuidelinesOnWritingCohortDefinitionLogicDescription.html
Looking at the cohort definition in atlas.ohdsi.org (screen shot) - one way you could write this is (example for your cosnideration)
Event Entry Criteria:
- an occurrence of procedure expected to be performed for persons with endometriosis with a diagnosis of endometriosis within 30 days of the procedure
Inclusion rule
- should have two more diagnosis in the future
- should be female
- should be between 15 to 49 years
Exit criteria
- A person is expected to be in the phenotype for the rest of their life (i.e. the disease never ends)