|
|
OverviewOnyx can include stages for collecting biological samples (blood, urine, and so on). This page explains how to configure a sample collection stage.
Configuration Files for Sample Collection StagesThe configuration files for the sample stage are found in the $custom-onyx/WEB-INF/config/ruby directory. SInce you copied the onyx-demo application, the directory should contain these standard configuration files:
and these files specific to the onyx-demo application which includes two sample collection stages (Blood and Urine, and Urine only):
Screenshot of a Sample Collection StageThe screenshot below shows the main page of a typical sample collection stage. The page includes a table of registered tubes. When the user scans the barcoce on a sample tube, the barcode is validated and if it passes validation, the tube is added to the table. Columns can be added to the table when you define the barcode structure. What's Involved in Configuring a Sample Collection StageConfiguring a sample collection stage involves the following:
Preparing a Bean for Your Sample Collection StageThe module-context.xml file that you copied from the onyx-demo application includes two bean definitions: one for each of the two sample collection stages defined in onyx-demo. You should copy one of these beans and modify its identifiers to fit your sample collection stage. For example, if your stage only for collecting blood, its identifiers would look like this: WEB-INF/config/ruby/module-context.xml Naming the StageThe string you use for key here is the name you will enter for the stage in the stages.xml file. See Adding the Stage to stages.xml. Defining the Number of Samples ExpectedTo define the number of samples (tubes) that the user is expected to collect during the stage, edit this property in the bean for your stage in WEB-INF/config/ruby/module-context.xml: <property name="expectedTubeCount" value="15" /> Defining the Barcode StructureThe barcode structure for the stage is defined in this property of the bean for your stage in WEB-INF/config/ruby/module-context.xml: <property name="barcodeStructure"> A structured barcode is validated by an ordered list of barcode part parsers. Each part parser is responsible for validating a certain number of characters within the barcode. When valid, this portion is removed from the barcode and the remaining sequence of characters is passed on to the next part parser. A barcode part parser can do the following:
Using Predefined Barcode ParsersYou can use these predefined parsers.
Example Using Predefined ParsersFor this barcode structure...
...the validation for the different parts of the barcode would be:
Here is how the above barcode structure would be validated: WEB-INF/config/ruby/module-context.xml This configuration would result in two columns being displayed in the table of registered tubes in Onyx. Localizing Labels for Columns and Tube TypesThe labels for columns and tube types must be added to the properties files in WEB-INF/config/ruby. The labels associated with the values of barcode parts are looked up using a key composed of the part's value and the parser's column title, like this: columnTitle.partValue. If no label is found for a particular part value, the part's value itself becomes the label. In the above example, the needed English labels would be defined by adding these lines to the English properties file: WEB-INF/config/ruby/messages_en.properties Defining Custom ParsersPart parsers classes must implement the IBarcodePartParser interface. As such, creating a custom parser is very straightforward. Defining Remarks for Drop-down ListWhen a tube is added to the table of registered tubes (see screenshot), an Edit link is available. This Edit link leads opens a dialog that includes a drop-down list of remarks that the user can choose from to describe the sample. To populate this file, you must:
Here are the codes for the remarks from the onyx-demo application: WEB-INF/config/ruby/remarks.xml Here are the English strings for the remarks in the onyx-demo application: WEB-INF/config/ruby/messages_en.properties Adding Custom MessagesAs shown in the screenshot, a sample collection stage can display a number of messages near the top of the main page of a sample collection stage. Defining Custom Messages for One Sample Collection StageTo set up custom messages for a particular sample collection stage, you must:
src/main/webapp/WEB-INF/config/ruby/module-context.xml Using the Same Messages for All Sample Collection Stages
NOTE: Do not add any <property name="infoMessagesFile"> elements to the module-context.xml file. Adding a Sample Collection Stage to OnyxTo add a sample collection stage to your custom version of Onyx, you must:
Adding the Stage to stages.xmlTo add a sample collection to your version of Onyx, you need to add a <stage> element to the WEB-INF/config/ruby/stages.xml file. The <name> of the stage must be the name used in the module_context file. See Naming the Stage. WEB-INF/config/ruby/stages.xml Localizing the Name of the StageTo localize the name of the physical measurement in each available interface language, you edit each of the properties files in the WEB-INF/config/ruby directory . For example, to localize the name of the BloodPressure stage:
WEB-INF/config/ruby/messages_en.properties
WEB-INF/config/ruby/messages_en.properties Setting the Position of the Stage in the InterviewTo establish where a stage fits in the interview, you add the stage name (for example: BloodSamplesCollection) to this line in the global Onyx configuration file : WEB-INF/config/onyx-config.properties Removing Traces of onyx-demo StagesWhen you have finished defining your custom sample collection stages, be sure to remove all traces of the stages copied from onyx-demo.
|
Search Onyx Documentation |
Configuring Sample Collection Stages
Labels:
None