Produced by Araxis Merge on 10/2/2017 7:00:31 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\opencds-knowledge-repository-data\src\main\resources\resources_v1.3\knowledgePackages | com.cognitive^abdominalAorticAneurysmScreening^1.0.0.drl | Wed Jul 12 18:43:52 2017 UTC |
| 2 | cds.zip\cds\product\production\opencds\opencds-knowledge-repository-data\src\main\resources\resources_v1.3\knowledgePackages | com.cognitive^abdominalAorticAneurysmScreening^1.0.0.drl | Wed Sep 27 16:16:24 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 302 |
| 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 | /* | |
| 2 | * COPYRIG HT STATUS: © 2015, 2 016. This work, aut hored by C ognitive M edical Sys tems | |
| 3 | * employe es, was fu nded in wh ole or in part by Th e Departme nt of Vete rans | |
| 4 | * Affairs under U.S . Governme nt contrac t VA118-11 -D-1011 / VA118-1011 -0013. | |
| 5 | * The cop yright hol der agrees to post o r allow th e Governme nt to post all or | |
| 6 | * part of this work in open-s ource repo sitories s ubject to the Apache License, | |
| 7 | * Version 2.0, date d January 2004. All other righ ts are res erved by t he | |
| 8 | * copyrig ht owner. | |
| 9 | * | |
| 10 | * For use outside t he Governm ent, the f ollowing n otice appl ies: | |
| 11 | * | |
| 12 | * Cop yright 201 5 © Cognit ive Medica l Systems | |
| 13 | * | |
| 14 | * Lic ensed unde r the Apac he License , Version 2.0 (the " License"); you may | |
| 15 | * not use this file excep t in compl iance with the Licen se. You ma y obtain | |
| 16 | * a c opy of the License a t http://w ww.apache. org/licens es/LICENSE -2.0 | |
| 17 | * | |
| 18 | * Unl ess requir ed by appl icable law or agreed to in wri ting, soft ware | |
| 19 | * dis tributed u nder the L icense is distribute d on an "A S IS" BASI S, | |
| 20 | * WIT HOUT WARRA NTIES OR C ONDITIONS OF ANY KIN D, either express or implied. | |
| 21 | * See the Licen se for the specific language g overning p ermissions and | |
| 22 | * lim itations u nder the L icense. | |
| 23 | * | |
| 24 | */ | |
| 25 | //created on: Mar 25 , 2015 | |
| 26 | package AA A | |
| 27 | ||
| 28 | import org .joda.time .Period; | |
| 29 | import org .joda.time .PeriodTyp e; | |
| 30 | import jav a.util.Dat e; | |
| 31 | import jav a.text.Dec imalFormat ; | |
| 32 | ||
| 33 | import ca. uhn.fhir.m odel.api.I Datatype; | |
| 34 | import ca. uhn.fhir.m odel.dstu2 .composite .CodeableC onceptDt; | |
| 35 | import ca. uhn.fhir.m odel.dstu2 .composite .CodingDt; | |
| 36 | import ca. uhn.fhir.m odel.dstu2 .composite .Contained Dt; | |
| 37 | import ca. uhn.fhir.m odel.dstu2 .resource. Communicat ionRequest ; | |
| 38 | import ca. uhn.fhir.m odel.dstu2 .resource. Provenance ; | |
| 39 | import ca. uhn.fhir.m odel.dstu2 .resource. Provenance .Agent; | |
| 40 | import ca. uhn.fhir.m odel.dstu2 .resource. Communicat ionRequest .Payload; | |
| 41 | import ca. uhn.fhir.m odel.dstu2 .resource. Observatio n; | |
| 42 | import ca. uhn.fhir.m odel.dstu2 .resource. Patient; | |
| 43 | import ca. uhn.fhir.m odel.primi tive.Strin gDt; | |
| 44 | import jav a.util.Arr ayList; | |
| 45 | import jav a.util.Lis t; | |
| 46 | ||
| 47 | ||
| 48 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.isCod ingContain s; | |
| 49 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.getVa lueQuantit y; | |
| 50 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.creat eProvenanc e; | |
| 51 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.creat eCommunica tionReques t; | |
| 52 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.hasIn putFlag; | |
| 53 | import fun ction org. opencds.se rvice.eval uate.FhirU tils.creat eOutputExt ension; | |
| 54 | ||
| 55 | ||
| 56 | global jav a.lang.Str ing client Language | |
| 57 | global jav a.lang.Str ing client TimeZoneOf fset | |
| 58 | global jav a.lang.Str ing focalP ersonId | |
| 59 | global jav a.util.Dat e evalTime | |
| 60 | global jav a.util.Has hSet asser tions | |
| 61 | global jav a.util.Has hMap named Objects | |
| 62 | ||
| 63 | ||
| 64 | declare AA A_SCREENIN G_COHORT | |
| 65 | @prope rtyReactiv e | |
| 66 | inDemo graphic : boolean @k ey | |
| 67 | sm okingHisto ry : bool ean @key | |
| 68 | ou tsideScree ning : boo lean @key | |
| 69 | end | |
| 70 | ||
| 71 | rule "Init ialize" | |
| 72 | sa lience 200 , no-loop | |
| 73 | wh en | |
| 74 | th en | |
| 75 | inse rt(new AAA _SCREENING _COHORT(fa lse, false , false)); | |
| 76 | end | |
| 77 | ||
| 78 | ||
| 79 | rule "inDe mographic" | |
| 80 | dialec t "java" | |
| 81 | salien ce 180 | |
| 82 | when | |
| 83 | $c ohort : AA A_SCREENIN G_COHORT() | |
| 84 | $patient : Patient ($birthtim e : birthD ate, gende r == "male ") | |
| 85 | $age : P eriod() fr om new Per iod($birth time.getTi me(), new Date().get Time(), Pe riodType.y ears()) | |
| 86 | ||
| 87 | eval($ag e.getYears () >= 65 ) | |
| 88 | eval($ag e.getYears () <= 75 ) | |
| 89 | then | |
| 90 | modify ($cohort) { setInDem ographic( true ) }; | |
| 91 | //Syst em.out.pri ntln($age. getYears() ); | |
| 92 | ||
| 93 | end | |
| 94 | ||
| 95 | rule "smok ingHistory " | |
| 96 | dial ect "java" | |
| 97 | sali ence 160 | |
| 98 | when | |
| 99 | $co hort : AAA _SCREENING _COHORT() | |
| 100 | $ob s : Observ ation() | |
| 101 | eval(isCod ingContain s($obs.get Code(), "h ttp://ehmp . DNS /terminolo gy/1.0", " /concept/H F.HISTORY% 20OF%20SMO KING")) | |
| 102 | ||
| 103 | then | |
| 104 | modi fy($cohort ) { setSmo kingHistor y( true ) }; | |
| 105 | ||
| 106 | end | |
| 107 | ||
| 108 | rule "hadO utsideScre ening" | |
| 109 | dial ect "java" | |
| 110 | sali ence 40 | |
| 111 | when | |
| 112 | $co hort : AAA _SCREENING _COHORT() | |
| 113 | $ob s : Observ ation() | |
| 114 | eval(isCod ingContain s($obs.get Code(), "h ttp://ehmp . DNS /terminolo gy/1.0", " /concept/H F.OUTSIDE% 20SCREENIN G%20FOR%20 AAA")) | |
| 115 | ||
| 116 | then | |
| 117 | modi fy($cohort ) { setOut sideScreen ing( true ) }; | |
| 118 | ||
| 119 | end | |
| 120 | ||
| 121 | rule "AAAS creening" | |
| 122 | dial ect "java" | |
| 123 | sali ence 0 | |
| 124 | when | |
| 125 | $co hort : AAA _SCREENING _COHORT( i nDemograph ic == true , smokingH istory ==t rue, outsi deScreenin g == false ) | |
| 126 | ||
| 127 | then | |
| 128 | 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 ."); | |
| 129 | Code ableConcep tDt catego ry = new C odeableCon ceptDt("SN OMED", "41 9772000"); | |
| 130 | comR equest.set Category(c ategory); | |
| 131 | cate gory.getCo dingFirstR ep().setDi splay("Fam ily Medici ne"); | |
| 132 | cate gory.setTe xt("Family Medicine" ); | |
| 133 | ||
| 134 | Code ableConcep tDt reason = new Cod eableConce ptDt("SNOM ED", "4197 72000"); | |
| 135 | comR equest.get Reason().a dd(reason) ; | |
| 136 | reas on.getCodi ngFirstRep ().setDisp lay("AAA S creening N CR"); | |
| 137 | ||
| 138 | Code ableConcep tDt priori ty = new C odeableCon ceptDt("CD S-System", "50"); | |
| 139 | prio rity.getCo dingFirstR ep().setDi splay("Rou tine"); | |
| 140 | comR equest.set Priority(p riority); | |
| 141 | ||
| 142 | Prov enance pro v = create Provenance ("http://w ww.uspreve ntiveservi cestaskfor ce.org/"); | |
| 143 | Cont ainedDt co ntained = new Contai nedDt(); | |
| 144 | contained. getContain edResource s().add(pr ov); | |
| 145 | comR equest.set Contained( contained) ; | |
| 146 | ||
| 147 | comR equest.add Undeclared Extension( createOutp utExtensio n()); | |
| 148 | prov .addUndecl aredExtens ion(create OutputExte nsion()); | |
| 149 | Syst em.out.pri ntln("AAA Screening Rule Fired "); | |
| 150 | ||
| 151 | name dObjects.p ut("commun icationReq uest", com Request); | |
| 152 | name dObjects.p ut("proven ance", pro v); | |
| 153 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.