Produced by Araxis Merge on 10/2/2017 7:00:17 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | cds.zip\cds\product\production\opencds\cds-rules-test\src\main\resources\rules | com.cognitive^abdominalAorticAneurysmScreening^1.0.0.drl | Fri Jul 1 17:45:46 2016 UTC |
| 2 | cds.zip\cds\product\production\opencds\cds-rules-test\src\main\resources\rules | com.cognitive^abdominalAorticAneurysmScreening^1.0.0.drl | Wed Sep 27 16:03:32 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 254 |
| Changed | 2 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | //created on: Mar 25 , 2015 | |
| 2 | package AA A | |
| 3 | ||
| 4 | import org .joda.time .Period; | |
| 5 | import org .joda.time .PeriodTyp e; | |
| 6 | import jav a.util.Dat e; | |
| 7 | import jav a.text.Dec imalFormat ; | |
| 8 | ||
| 9 | import ca. uhn.fhir.m odel.api.I Datatype; | |
| 10 | import ca. uhn.fhir.m odel.dstu2 .composite .CodeableC onceptDt; | |
| 11 | import ca. uhn.fhir.m odel.dstu2 .composite .CodingDt; | |
| 12 | import ca. uhn.fhir.m odel.dstu2 .composite .Contained Dt; | |
| 13 | import ca. uhn.fhir.m odel.dstu2 .resource. Communicat ionRequest ; | |
| 14 | import ca. uhn.fhir.m odel.dstu2 .resource. Provenance ; | |
| 15 | import ca. uhn.fhir.m odel.dstu2 .resource. Provenance .Agent; | |
| 16 | import ca. uhn.fhir.m odel.dstu2 .resource. Communicat ionRequest .Payload; | |
| 17 | import ca. uhn.fhir.m odel.dstu2 .resource. Observatio n; | |
| 18 | import ca. uhn.fhir.m odel.dstu2 .resource. Patient; | |
| 19 | import ca. uhn.fhir.m odel.primi tive.Strin gDt; | |
| 20 | import jav a.util.Arr ayList; | |
| 21 | import jav a.util.Lis t; | |
| 22 | ||
| 23 | ||
| 24 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.isCod ingContain s; | |
| 25 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.getVa lueQuantit y; | |
| 26 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.creat eProvenanc e; | |
| 27 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.creat eCommunica tionReques t; | |
| 28 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.hasIn putFlag; | |
| 29 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.creat eOutputExt ension; | |
| 30 | ||
| 31 | ||
| 32 | global jav a.lang.Str ing client Language | |
| 33 | global jav a.lang.Str ing client TimeZoneOf fset | |
| 34 | global jav a.lang.Str ing focalP ersonId | |
| 35 | global jav a.util.Dat e evalTime | |
| 36 | global jav a.util.Has hSet asser tions | |
| 37 | global jav a.util.Has hMap named Objects | |
| 38 | ||
| 39 | ||
| 40 | declare AA A_SCREENIN G_COHORT | |
| 41 | @prope rtyReactiv e | |
| 42 | inDemo graphic : boolean @k ey | |
| 43 | sm okingHisto ry : bool ean @key | |
| 44 | ou tsideScree ning : boo lean @key | |
| 45 | end | |
| 46 | ||
| 47 | rule "Init ialize" | |
| 48 | sa lience 200 , no-loop | |
| 49 | wh en | |
| 50 | th en | |
| 51 | inse rt(new AAA _SCREENING _COHORT(fa lse, false , false)); | |
| 52 | end | |
| 53 | ||
| 54 | ||
| 55 | rule "inDe mographic" | |
| 56 | dialec t "java" | |
| 57 | salien ce 180 | |
| 58 | when | |
| 59 | $c ohort : AA A_SCREENIN G_COHORT() | |
| 60 | $patient : Patient ($birthtim e : birthD ate, gende r == "male ") | |
| 61 | $age : P eriod() fr om new Per iod($birth time.getTi me(), new Date().get Time(), Pe riodType.y ears()) | |
| 62 | ||
| 63 | eval($ag e.getYears () >= 65 ) | |
| 64 | eval($ag e.getYears () <= 75 ) | |
| 65 | then | |
| 66 | modify ($cohort) { setInDem ographic( true ) }; | |
| 67 | //Syst em.out.pri ntln($age. getYears() ); | |
| 68 | ||
| 69 | end | |
| 70 | ||
| 71 | rule "smok ingHistory " | |
| 72 | dial ect "java" | |
| 73 | sali ence 160 | |
| 74 | when | |
| 75 | $co hort : AAA _SCREENING _COHORT() | |
| 76 | $ob s : Observ ation() | |
| 77 | eval(isCod ingContain s($obs.get Code(), "h ttp://ehmp . DNS /terminolo gy/1.0", " /concept/H F.HISTORY% 20OF%20SMO KING")) | |
| 78 | ||
| 79 | then | |
| 80 | modi fy($cohort ) { setSmo kingHistor y( true ) }; | |
| 81 | ||
| 82 | end | |
| 83 | ||
| 84 | rule "hadO utsideScre ening" | |
| 85 | dial ect "java" | |
| 86 | sali ence 40 | |
| 87 | when | |
| 88 | $co hort : AAA _SCREENING _COHORT() | |
| 89 | $ob s : Observ ation() | |
| 90 | eval(isCod ingContain s($obs.get Code(), "h ttp://ehmp . DNS /terminolo gy/1.0", " /concept/H F.OUTSIDE% 20SCREENIN G%20FOR%20 AAA")) | |
| 91 | ||
| 92 | then | |
| 93 | modi fy($cohort ) { setOut sideScreen ing( true ) }; | |
| 94 | ||
| 95 | end | |
| 96 | ||
| 97 | rule "AAAS creening" | |
| 98 | dial ect "java" | |
| 99 | sali ence 0 | |
| 100 | when | |
| 101 | $co hort : AAA _SCREENING _COHORT( i nDemograph ic == true , smokingH istory ==t rue, outsi deScreenin g == false ) | |
| 102 | ||
| 103 | then | |
| 104 | Comm unicationR equest com Request = createComm unicationR equest("Th e U.S. Pre ventive Se rvices Tas k Force re commends o ne-time sc reening fo r abdomina l aortic a neurysm (A AA) for me n aged 65- 75 who hav e smoked a t least 10 0 cigarett es in thei r lifetime ."); | |
| 105 | Code ableConcep tDt catego ry = new C odeableCon ceptDt("SN OMED", "41 9772000"); | |
| 106 | comR equest.set Category(c ategory); | |
| 107 | cate gory.getCo dingFirstR ep().setDi splay("Fam ily Medici ne"); | |
| 108 | cate gory.setTe xt("Family Medicine" ); | |
| 109 | ||
| 110 | Code ableConcep tDt reason = new Cod eableConce ptDt("SNOM ED", "4197 72000"); | |
| 111 | comR equest.get Reason().a dd(reason) ; | |
| 112 | reas on.getCodi ngFirstRep ().setDisp lay("AAA S creening N CR"); | |
| 113 | ||
| 114 | Code ableConcep tDt priori ty = new C odeableCon ceptDt("CD S-System", "50"); | |
| 115 | prio rity.getCo dingFirstR ep().setDi splay("Rou tine"); | |
| 116 | comR equest.set Priority(p riority); | |
| 117 | ||
| 118 | Prov enance pro v = create Provenance ("http://w ww.uspreve ntiveservi cestaskfor ce.org/"); | |
| 119 | Cont ainedDt co ntained = new Contai nedDt(); | |
| 120 | contained. getContain edResource s().add(pr ov); | |
| 121 | comR equest.set Contained( contained) ; | |
| 122 | ||
| 123 | comR equest.add Undeclared Extension( createOutp utExtensio n()); | |
| 124 | prov .addUndecl aredExtens ion(create OutputExte nsion()); | |
| 125 | Syst em.out.pri ntln("AAA Screening Rule Fired "); | |
| 126 | ||
| 127 | name dObjects.p ut("commun icationReq uest", com Request); | |
| 128 | name dObjects.p ut("proven ance", pro v); | |
| 129 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.