Query on max lengths changes
I am doing a tweak (adjust act.patientMedication to include the label text in the description) that required extending the length of the description field beyond 255 characters to say 500 characters.
Am I correct in thinking that two changes are required: 1) change the act.patientMedication archetype to inclease the max length of the description field; 2) alter the size of the description column in the acts table from 255 to say 500 characters.
I have done the above (the 2nd using "alter table acts modify column description varchar(500) null;").
This seems to be working - ie the Medical Records screen now shows (after modifying the act.patientMedication archetype to get the label text included in the description):
Q1: Is this increase in the acts description column going to cause any problems I have not found yet? [I am concerned that 255 max length is so common in the system that there are bits in the code that assume strings are in general no more than 255 characters.]
Q2: although I have used "alter table .. modify column ..." to do the testing, for my conversion runs (which completely rebuild the database), I plan to simply edit the db.sql file to increase the column size to 500. This is correct isn't it?
Regards, Tim G
Re: Query on max lengths changes
It should work, although you can probably avoid doing this by changing how medications display rather than changing the database.
There is a configuration file named IMObjectTableModelFactory.xml in the openvpms-web-workspaces jar that can be changed to alter the display. Note that you'll need to unzip/rezip the jar in order to do this.
Current contents are:
You'd need to change the act.patientMedication entry. E.g.:
-Tim A
Re: Query on max lengths changes
Tim - thanks for this - works a treat. I ended up using:
to format the label onto its own lines.
Regards, Tim G