We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Business rules layer.

Ooph, I’m running short on time.

Here’s my quick-n-dirty thought on using drools for the business rules. I think it is a great idea if the goal is to allow non-programmers to set up business rules on a per-installation baisis… however, there would be a lot of work necessary to get to that level. Here is what I propose.

Start small… slowly pull all the business logic into a few central controllers. For example, when you say SubjectController.createSubject(SubjectBean) have all the code hidden in there that handles checking for existing users, etc. etc…

Once the code is brought up to that level, it may be eaiser to bring in a rules engine which would allow non-programmers to hack openClinica.

Whaddayouthink?

jordan

The materials in this e-mail are private and may contain Protected Health Information. If you are not the intended recipient be advised that any unauthorized use, disclosure, copying, distribution or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone at 314-747-8162 or by return e-mail.
Sent: Friday, January 20, 2006 10:59 AM
To: [email protected]
Subject: RE: [Developers] first post.

Hi Jordan and Shai,

You both raise very good points about incorporating frameworks into the OpenClinica code. Jordan, some of us had also previously been discussing the idea of using Struts Action to take over for our control servlets, do you have any experience with either Struts package (Action or Shale) and how they stack up against Spring? What are some of the tradeoffs?

Shai, you raise a good point about the business logic layer--we had discussed getting Drools to help us with that a little and I had put some stubs of code for a small business-logic class in the code base, they should still be there under org.akaza.openclinica.logic.core.

Jordan, the regular expression code is in the 1.0 release, and I would certainly like to hear more about the external hooks you were able to put into the system. What application did you use to package them up? Were there issues with security and user validation?

Cheers,
Tom

Tom Hickerson
Senior Project Coordinator
Akaza Research
One Kendall Square, Bldg 400, Fourth Floor
Cambridge, MA 02139
p 617.621.8585 x15
f 617.621.0065
"Open informatics for public research"
http://www.akazaresearch.com/
Sent: Friday, January 20, 2006 10:55 AM
To: Woerndle,Jordan; [email protected]
Subject: RE: [Developers] first post.
Hi Jordan,

Thanks for your email. Certainly a lot of good ideas in here.

Porting OpenClinica to Hibernate is certainly a good idea, and I hope to look into that in the near future. From a code infrastructure point of view, what other ideas do you have on improving the code base? For example, another priority for me is to clean up the Validation class and define a clean interface so that developers can create new validation types by subclassing an abstract ValidationType class (or something like that.) The current class started out as a much more lightweight piece of code, but I think an overhaul is in order.

Another priority is developing a business rules layer separate from the servlet/form processing layer. Right now there are a lot of business rules running around the application - for example, you can't perform double data entry on a CRF unless a) you did not perform the first round of data entry or b) more than 12 hours have passed since you completed the first round of data entry. This is a good rule, but it's hard to find in the code. It would be nice to put such rules in small, easy to find (and change, if the mood strikes you) classes. We did some research on business rules engines a while back, and at some point I'd like to dust that off and see if we can't work it into the code base.

Any other thoughts?

Shai Sachs
Director of Research and Development
Isovera.com
One Kendall Square, Building 400
Cambridge, MA 02139
office: 617-621-8555 x 12
mobile: 617-833-3648
http://www.isovera.com
Sent: Thursday, January 19, 2006 4:56 PM
To: [email protected]
Subject: [Developers] first post.
Hi there,

I’m glad to see the developer’s mailing list up and running. Tom asked me to start a thread on how I integrated beanshell to support scriptable actions on individual items. I’d be happy to explain if anyone is interested. In fact, let me know if you’re interested in my implementation of:

Regular expression data entry validation (is that included in the 1.0 release?)

BeanShell scripting for data entry validation (ranges, data types, calls to external sources.. pretty much anything you can think of.)

External hooks to create subjects and events in response to external events. I built a client app that packages data and ships it to our server. OpenClinica can pick the data up and create/populate new events. It will also notify people that new events are ready for review.

As a side note, does anyone want to port openclinica to use spring/hibernate/acegi? Why? Well, I couldn’t bend OpenClinica to do something we needed so I spent the last month building something from scratch. I built similar features into my new app with about 530k of source code (including jsp’s) and configuration. My last count of open clinica source is 4 MB and about 2MB of jsp’s.

Jordan


The materials in this e-mail are private and may contain Protected Health Information. If you are not the intended recipient be advised that any unauthorized use, disclosure, copying, distribution or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone at 314-747-8162 or by return e-mail.

Comments

  • I recall that this was the same conclusion we came to about Drools; in the long term we would like to see it in play, but a step-by-step implementation would also be nice.

    We started a set of rule collections in the org.akaza.openclinica.logic.core package, but what is taking place there would not be centralizing business logic as much as distributing business logic; we would be creating a number of 'rule classes' (implementing org.akaza.openclinica.logic.core.BusinessRule) that would in turn be called by the 'evaluator' (represented by the class org.akaza.openclinica.logic.core.BusinessEvaluator). This has a chance of overlapping with the Validation code that we have in a different part of the application, however, and also seems to open the floodgate for a large number of rule classes that can't be duplicated.

    So Jordan, when you are talking about consolidation, is there a specific pattern that comes to mind? Also, do you think we could use some of the Validation classes to take the place of the rule classes?

    Cheers, Tom

    Tom Hickerson
    Senior Project Coordinator
    Akaza Research
    One Kendall Square, Bldg 400, Fourth Floor
    Cambridge, MA 02139
    p 617.621.8585 x15
    f 617.621.0065
    "Open informatics for public research"
    http://www.akazaresearch.com/
    Sent: Monday, January 23, 2006 12:15 PM
    To: [email protected]
    Subject: [Developers] Business rules layer.
    Ooph, I’m running short on time.

    Here’s my quick-n-dirty thought on using drools for the business rules. I think it is a great idea if the goal is to allow non-programmers to set up business rules on a per-installation baisis… however, there would be a lot of work necessary to get to that level. Here is what I propose.

    Start small… slowly pull all the business logic into a few central controllers. For example, when you say SubjectController.createSubject(SubjectBean) have all the code hidden in there that handles checking for existing users, etc. etc…

    Once the code is brought up to that level, it may be eaiser to bring in a rules engine which would allow non-programmers to hack openClinica.

    Whaddayouthink?

    jordan

    The materials in this e-mail are private and may contain Protected Health Information. If you are not the intended recipient be advised that any unauthorized use, disclosure, copying, distribution or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone at 314-747-8162 or by return e-mail.
    Sent: Friday, January 20, 2006 10:59 AM
    To: [email protected]
    Subject: RE: [Developers] first post.

    Hi Jordan and Shai,

    You both raise very good points about incorporating frameworks into the OpenClinica code. Jordan, some of us had also previously been discussing the idea of using Struts Action to take over for our control servlets, do you have any experience with either Struts package (Action or Shale) and how they stack up against Spring? What are some of the tradeoffs?

    Shai, you raise a good point about the business logic layer--we had discussed getting Drools to help us with that a little and I had put some stubs of code for a small business-logic class in the code base, they should still be there under org.akaza.openclinica.logic.core.

    Jordan, the regular expression code is in the 1.0 release, and I would certainly like to hear more about the external hooks you were able to put into the system. What application did you use to package them up? Were there issues with security and user validation?

    Cheers,
    Tom

    Tom Hickerson
    Senior Project Coordinator
    Akaza Research
    One Kendall Square, Bldg 400, Fourth Floor
    Cambridge, MA 02139
    p 617.621.8585 x15
    f 617.621.0065
    "Open informatics for public research"
    http://www.akazaresearch.com/
    Sent: Friday, January 20, 2006 10:55 AM
    To: Woerndle,Jordan; [email protected]
    Subject: RE: [Developers] first post.
    Hi Jordan,

    Thanks for your email. Certainly a lot of good ideas in here.

    Porting OpenClinica to Hibernate is certainly a good idea, and I hope to look into that in the near future. >From a code infrastructure point of view, what other ideas do you have on improving the code base? For example, another priority for me is to clean up the Validation class and define a clean interface so that developers can create new validation types by subclassing an abstract ValidationType class (or something like that.) The current class started out as a much more lightweight piece of code, but I think an overhaul is in order.

    Another priority is developing a business rules layer separate from the servlet/form processing layer. Right now there are a lot of business rules running around the application - for example, you can't perform double data entry on a CRF unless a) you did not perform the first round of data entry or b) more than 12 hours have passed since you completed the first round of data entry. This is a good rule, but it's hard to find in the code. It would be nice to put such rules in small, easy to find (and change, if the mood strikes you) classes. We did some research on business rules engines a while back, and at some point I'd like to dust that off and see if we can't work it into the code base.

    Any other thoughts?

    Shai Sachs
    Director of Research and Development
    Isovera.com
    One Kendall Square, Building 400
    Cambridge, MA 02139
    office: 617-621-8555 x 12
    mobile: 617-833-3648
    http://www.isovera.com
    Sent: Thursday, January 19, 2006 4:56 PM
    To: [email protected]
    Subject: [Developers] first post.
    Hi there,

    I’m glad to see the developer’s mailing list up and running. Tom asked me to start a thread on how I integrated beanshell to support scriptable actions on individual items. I’d be happy to explain if anyone is interested. In fact, let me know if you’re interested in my implementation of:

    Regular expression data entry validation (is that included in the 1.0 release?)

    BeanShell scripting for data entry validation (ranges, data types, calls to external sources.. pretty much anything you can think of.)

    External hooks to create subjects and events in response to external events. I built a client app that packages data and ships it to our server. OpenClinica can pick the data up and create/populate new events. It will also notify people that new events are ready for review.

    As a side note, does anyone want to port openclinica to use spring/hibernate/acegi? Why? Well, I couldn’t bend OpenClinica to do something we needed so I spent the last month building something from scratch. I built similar features into my new app with about 530k of source code (including jsp’s) and configuration. My last count of open clinica source is 4 MB and about 2MB of jsp’s.

    Jordan


    The materials in this e-mail are private and may contain Protected Health Information. If you are not the intended recipient be advised that any unauthorized use, disclosure, copying, distribution or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone at 314-747-8162 or by return e-mail.
This discussion has been closed.