This wiki has undergone a migration to Confluence found Here

Difference between revisions of "VMR Examples"

From HL7Wiki
Jump to navigation Jump to search
m
m
Line 2: Line 2:
  
 
  -- this example requires the HL7v3RIM.model loaded.
 
  -- this example requires the HL7v3RIM.model loaded.
  Let BreastCancer: CD = Factory.codedvalue('123456', 'SNOMED-CT', 'Breast Cancer')
+
  Let BreastCancer: CD = Factory.codedvalue('254837009', 'SNOMED-CT', 'Breast Cancer')
 
  Let EarlyBreastCancerCount: Integer =
 
  Let EarlyBreastCancerCount: Integer =
 
   FamilyHistory.relatives -> iterate(x; i:Integer = 0 |
 
   FamilyHistory.relatives -> iterate(x; i:Integer = 0 |

Revision as of 21:44, 6 November 2009

This an example of gello code talking to a vMR looking for family history of early onset breast cancer

-- this example requires the HL7v3RIM.model loaded.
Let BreastCancer: CD = Factory.codedvalue('254837009', 'SNOMED-CT', 'Breast Cancer')
Let EarlyBreastCancerCount: Integer =
  FamilyHistory.relatives -> iterate(x; i:Integer = 0 |
                                     if (x.clinicalGenomicObservations ->
                                     select(code.implies(BreastCancer) and (dataEstimatedAge() < 50)).isEmpty()) then i else i + 1 endif)
EarlyBreastCancerCount > 0


Back