Accessing Laboratory Tests on a Submission Form

I was reviewing the lab submissions templates for non integrated labs 

I was looking at adding tests 

I couldn't work out the correct JRXML to access the 'tests' field 

what I noted was the investigations archetype actually has 2 fields with the same name?

In any event I wanted to add a list of associated tests to a submission using a subreport

I was trying to work out the datasource expression for the subreport but couldn't quite work the XPath out

Then in the subreport display a list of test with codes 

On that note the "Code" field on Lab tests seems to be readonly by default even when creating a new test.  Not sure why - for non integrated labs the field should be editable.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Accessing Laboratory Tests on a Submission Form

Hi Ben - appologies for the delay in responding to this.

To list the test names of an investigation in a form, you don't need a subreport. You can use:

[list:names(list:values('tests.entity'))]
  • list:values('test.entities') - gets the tests
  • list:names(...) - concatenates the names of the tests

The code field is only provided for integrated laboratories, so it can't be edited.

With regards to why there are two document nodes - they both refer to the same thing. The docReference is the old name, and is retained for legacy reasons.

 

Syndicate content