Change to Patient Details Archetype

I have a proposal to adjust the patient archetype to include a new field 
Existing Field

Breed 
 

Change 

Primary Breed

Add

Secondary Breed

 

The Breed field would become a derived field temporarily making sure we maintain backward consistency

 

The derivation would be 

"Primary Breed" x "Secondary Breed

or 

Primary Breed 

if econdary breed was none

or 

Primary Breed x 
if 2nd breed was unknown.

This would significantly reduce the number of Breed lookups we need and create a far more flexible system going forward.

 

 

Comment viewing options

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

Re: Change to Patient Details Archetype

I don't think changing the breed to a derived field would work.

It would break:

  • the plugin API support for patients, where the breed is expected to be a lookup.
  • SQL reports that join the breed with the lookups table to get the breed name

That said, a secondary breed field could still be added, and the existing breed field treated as the primary one.

It would mean that reports need to be updated:

  • JasperReports and Word/OpenOffice documents that use the breed via expressions like 'patient.entity.breed' would also need to include the secondary breed e.g.:
    $F{patient.entity.breed} + ($F{patient.entity.secondaryBreed} == null ? "" : " x " + $F{patient.entity.secondaryBreed})
  • SQL reports would need to check for a secondary breed as well

It may also affect plugins that map breeds. This may be less of an issue as while breed mapping is supported, its not used in practice as far as I know.

 

 

 

Syndicate content