Tag Archives: central designer

Central Designer : Custom Function

A few days ago I received an interesting mail from M. Gupta from my other personal website EDC Developer in which Gupta asked: “Custom Function not working. Hi Anayansi, I have developed a custom function in C# for Central designer but looks like it is not even executing could you please share the steps to create and deploy the custom function”.

First of all, sorry it took me a little longer to respond. My time is limited and I don’t often get this kind of emails from my EDC Developer personal site (this website is for recruiters / potential clients for consulting assignments). Here at {EDC} Developer wordpress, I shared knowledge-based and industry related practices.

anayansigamboa - c# programming
image credit courtesy of Google

Before you can start rules programming in Central Designer, you must make sure you have the following rights assigned to you:

Study Rule Design (either as a study designer or rule writer):

  • Import User-defined functions
  • Define/modify data entry rules
  • Define/modify constants

Some companies assigned a group of people to write rules (rule writers but without access to other modules/features in CD) and the study designer is in charged of the eCRF study build (forms design). That way, while a study designer is building a form, the rule programmer can start edit checks/rule programming activities on other forms.

Remember the custom functions are programs written outside Central Designer. Functions allow you to encapsulate a piece of code and call it from other parts of your code. You may very soon run into a situation where you need to repeat a piece of code, for multiple visits for example, and this is where functions come in.

You will need Visual Studio or C#. Once you program and test your code and assuming it is working, you can load it onto CD (see user rights and refer to the annotated eCRF).

Example: Query rules may not run as expected on initial submissions for an itemset, if there is a calculation rule that sets the value on an item in a different visit, and the calculation rule is attached to the same form as the query rule.

In a previous article about troubleshooting in CD, I discussed some ways to troubleshoot rules. It will give you some insights about what to check when a rule is not working.

Something else to consider during rule development:

  • Source control your code and binaries using VSS or similar tools.
  • dll versioning may cause existing functions to stop working.
  • You can deploy functions on a study or library level. Any changes will affect other studies.
  • Remove anything that is not being referenced
  • Try using Try-Catch
  • Remember to reference CD (still called PhaseForward or see other functions provided by Oracle/PhaseForward during the initial installation) still under the old name – PhaseForward
  • Unit test (extensively) in a test environment

Rules Unit Testing:

  • Turn on rule tracing in the InForm event log
  • Check the log (warnings / errors can give you some clues that something is not right with an edit check calling this new custom function
  • Write and run test cases for data-entry rules, global conditions or workflow rules (this is very important)

Now we are ready for testing in InForm (this requires deployment).

And if it all else fails, try this article about Learn How to Avoid The 10 Most Common C# Mistakes.

Good luck and thank you for connecting.

Comments? Please post it below.

Anayansi Gamboa, MPM, an EDC Developer Consultant and clinical programmer for the Pharmaceutical and Biotech industry with more than 13 years of experience.

Available for short-term contracts or ad-hoc requests. See my specialties section (Oracle, SQL Server, EDC Inform, EDC Rave, OpenClinica, SAS and other CDM tools)

Central Designer – Troubleshooting Tips

If an edit check or function fails to behave as expected, it is time to use your ‘troubleshooting’ skills. The following tips may help you when you are troubleshooting rules in InForm:


  • check if rules are running
  • check the rule logic
  • check Rule Dependencies: a rule on a form has access to items on that form, but not other forms or other visits
  • check InForm machine’s Application Event Log

Though some vendors will correct major problems with their products by releasing entirely new versions, other vendors may fix minor bugs by issuing patches, small software updates that address problems detected by users or developers.

Check the release notes for Central Designer for known problems. The release notes provide descriptions and workaround solutions for known problems.
Remember that there is a report available you can run “Data Entry Rule Actions Report”. This report outputs all data entry rules in CSV format and can be formatted into an edit check specification documentation for QA testing.
A rule can be written in more than one way, which makes it difficult to impose any restrictions:
Scenario: Route item has 3 choices. OP, SC and IV. Query should fire if the user does not choose either OP or SC. This rule could be written in many ways:

–Value = route.Value

If (value == 3)

–Value = route.Value == 3

If (value == true)

–Value = !(route.Value == 3)

If (value == false)

–Value = (route.Value == 1 || route.Value == 2)

If (value == false)

–Value = route.Value !=1 && route.Value != 2

If (value == true)

Keep it consistent across the trial. Do not overuse the conditional statements when a simple range check should be program.

Note: Be aware that if you want to reuse a rule that uses data from a logical schema in another study, the other study must also contain the logical schema.

If you have explored most of the obvious possibilities and still
cannot get your rule / edit check to work, ask someone in your team to peer review the build.


  • unit test your code
  • context available for defining test cases
  • Site name, date/time, locale; Form associations; Empty values; Unknown dates; Repeating objects
  • test case results: Pass or Fail based on expected results
  • perform formal QA / QT

Remember to check the Event log via Control Panel -> Administrative Tools -> Event Viewer

Reference Document : Central Designer – Rule Troubleshooting.pdf

Your comments and questions are valued and encouraged.
Anayansi Gamboa has an extensive background in clinical data management as well as experience with different EDC systems including Oracle InForm, InForm Architect, Central Designer, CIS, Clintrial, Medidata Rave, Central Coding, OpenClinica, Open Source and Oracle Clinical.

Central Designer aCRF Generation

aCRF casebook ;- PDF file

1. Project Explorer – click on the 2nd level study name

2. File ->; Annotated Study Book Options

3. Uncheck Time and Events table

4. Uncheck Study Object Description Tables
5. Change date variable format to match eCRF ;map, setting is not noted on aCRF output

6. File ->; View Annotated Study Book

7. Pop up screen, click Print in lower right

8. Select Printer – Adobe PDF (single click)
9. Click Preferences

10. Click on Layout tab
11. Change to Landscape

12. Click on Advance tab in lower right

13. Change Scaling as needed, check PDF output as needed

14. Select Print, wait for file name box, aCRF is done.

Time and Events Table – CSV file

1. File ->; Annotated Study Book Options

2. Check Time and Events Table

3. File ->; View Annotated Study Book

4. Click on Save Time & Events as button lower left

5. Give it a file name

Note: ;Steps 1-5 have to be repeated every time as aCRF defaults back to base settings after you close out the study.

Anayansi Gamboa has an extensive background in clinical data management as well as experience with different EDC systems including Oracle InForm, InForm Architect, Central Designer, CIS, Clintrial, Medidata Rave, Central Coding, OpenClinica Open Source and Oracle Clinical.