260 likes | 381 Views
Idiom Business Rules Stuff you haven’t seen before. 2007 PPM User Conference. Richard Morrall. Agenda for today. New schema what is in the new schema Schema version control how PHS is going to manage schema change in the future Choose: Inline testing functions User defined operators
E N D
Idiom Business RulesStuff you haven’t seen before 2007 PPM User Conference Richard Morrall
Agenda for today • New schemawhat is in the new schema • Schema version controlhow PHS is going to manage schema change in the future • Choose: • Inline testing functions • User defined operators • Useful tools
New Schema • No changes to schema structure • Added detail to supplied patient data, restructured to be a bit more logical • Patient UR number and demographics • Procedure data allows for theatre and surgeon detail • Diagnosis – version • Outpatients – HDF 6-10 and hospital id • Service – code description, hospital id • Cost outputs at service code level
Schema version control • Schema changes are infrequent • Tighten up relationship of schema to PPM versionsOne to Many • Schemas will be named per sitePCR_Schema_v5_BSH_allData • Schema update will be managed by PHS as part of upgrades
PPM upgrade with new PCR Schema • Site asked to provide current repositories • Site requested to run current version for a month and save as a specific (base) configuration • PHS will convert repository to new schema and confirm structure is sound • PHS will provide site with new repositories and jar files • Site requested to run new version with same parameters as base configuration and compare results between base and new
Choices Choices Choices • Inline testing • Use inline testing to step through decisions • User defined operators • Build your own functions for formulas that repeat • Useful tools • Windows Grep – find detail in many files with one command
Inline testing • Idiom test facilities: • Inline testing functions • Test executive • Inline testing useful for • Testing individual decisions as developing • Trouble-shooting scope by walking through the process
Opens up a new blank input document • You can either type in the values needed to test your decisions (double-click on element)
Import a pre-existing xml document • from PCR or manually created • Set a breakpoint
Click run • Step into (F8) to open formula and work through it
Each ‘run’ goes in the document list.Doubleclick on a point in the list to return to that point Hover over to see result of each part of the formula The results of formulas are written to the document
Exercise 1 • Open scope State Model • Click Inline testing and open existing document desktop\inlinetest\testinline.xml • Set a breakpoint on Select WIES Contract • Press Run • Find and fix error
Exercise 2 • Edit the test document • Find episode_of_care_id and change value from 4 to 5 • Set breakpoint on Eligible for WIES • What happens?
Inline testing • Good for • Testing a bit at a time • Finding bugs / errors • Can modify imported documents by double clicking and editing values • Can be slow, especially with multiple value collections
User-Defined Operationre-usable formulas • Create once, re-use often • Unresolved arguments • Floating context • Speeds up building scopes that re-use the same thing often
User-Defined Operation • Right click on appropriate node & select new user defined operation • Build as per any other formula except: • For values that will vary for each formula set as UDO parameter • Just enter a string that makes it clear what goes in that spot
User-Defined Operators • In use: • Drag UDOs onto formulas like any other node • Provide the parameters (nodes or entered values)
User defined operators • This: • To this:
Exercise 3Build your own UDO • Review the formulas 305 Dialysis Label, 306 Chemotherapy label, etc • Right click on \Product\SubProducts\SubProduct • Select New User Defined Operation • Name it WRITE:ProductLineLabel and click OK • Copy structure from 305 Dialysis Label • Process = IF • Boolean = Node - IsValidNode \Product\SubProducts\ValueType\IntValue • True = Process – AbortDecisionGroup • False = SET AS UDO PARAMETER
Exercise 3 • Use new UDO to replace existing formulas • Select 305 Dialysis – Label • Replace existing IF with UDO(drag and drop) • TEST • Set patient_type_id = SD • Set drg_code = L61Z • Run
When to use UDOs • Repeating formulas that take different arguments • Same formula used in different context (need to resolve the same thing in different parts of the schema structure)
Useful Tools • Application for managing large numbers of files (like the in and out files for PCR) • Allows you to search all files in a directory for a single value (e.g. UR number) – very handy when trying to trouble shoot • Has a wizard interface for searches – makes it pretty easy
Searched for 1085800 – found in 3 files of 105 Line number in file given – you can open the file to edit in Windows Grep, or external editor Windows Grep
Exercise 4 • Use Windows Grep to find an episode in a large number of xml files • Open Windows Grep • Search for L61 on files in Windows Grep
Useful Tools • Windows Grep is shareware: • Download from www.wingrep.com • Note: PHS does not support or endorse it – it is a useful tool, one of many around