Uploaded image for project: 'VPMS Web Application'
  1. OVPMS-2016

Change Medical Records.jrxml to use $OpenVPMS.patient instead of patient node

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 1.9
    • Fix versions: 2.0
    • Components: Reporting
    • Labels:
      None
    • Sprint:

      Description

      The Medical Records.jrxml accesses the patient using:
      1. openvpms:get(.,'patient.entity') for fields; and
      2. $P

      {dataSource}.getDataSource("patient") for the letterhead subreport

      These can fail if the report is customised to change the order of records. If the first record happens to be an Investigation Version, Attachment Version or Image Version, the report fails, as none of these archetypes have a patient node.
      An error might present as:
      Error evaluating expression for source text: $F{patient.entity.dateOfBirth}
      


      (Note that at present, the actual object passed to the Letterhead.jrxml report is immaterial. It is required so the record set is non-empty).

      To avoid this:
      * use OpenVPMS.patient to access the patient. This is a field supplied to the report
      * use $P{dataSource}

      .getExpressionDataSource("$OpenVPMS.patient") for the Letterhead.jrxml datasource expression

        Attachments

          Activity

            People

            • Assignee:
              tanderson Tim Anderson
              Reporter:
              tanderson Tim Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Who's Looking?