Dear Frank,
I was just suggesting that you should have a look at the log file, which might give us some more information.
Anyway, just sent HL7 ORM^O01 messages to dcm4chee
first creating a new order with message:
MSH|^~\&|OpenMRSRadiologyModule|OpenMRS|||20150623130512||ORM^O01|1|P|2.3.1
PID|||100-8||Patient^John^D||19750101000000|M
ORC|NW|1|||||^^^20150623000000^^R
OBR|||||||||||||||||||1|1||||XA
ZDS|1.2.826.0.1.3680043.8.2186.1.1^^Application^DICOM
second trying to remove the modality "XA" (just as an example of removing a set field) from the order in dcm4chee with message:
MSH|^~\&|OpenMRSRadiologyModule|OpenMRS|||20150623130512||ORM^O01|1|P|2.3.1
PID|||100-8||Patient^John^D||19750101000000|M
ORC|XO|1|||||^^^20150623000000^^R
OBR|||||||||||||||||||1|1||||
ZDS|1.2.826.0.1.3680043.8.2186.1.1^^Application^DICOM
Now I can confirm that I see the same behavior as you do, the modality is not cleared by sending another ORM with "XO" and the modality field left empty. The modality remains with "XA" in the dcm4chee mwl.
Also tried to remove the Scheduled Procedure Step Start Date and the Requested Procedure Priority from the dcm4chee MWL by sending another ORM with "XO" and leaving the field empty but this had no effect.
Sending an empty string "" for the Requested Procedure Priority, like so:
MSH|^~\&|OpenMRSRadiologyModule|OpenMRS|||20150623130512||ORM^O01|2|P|2.3.1
PID|||100-8||Patient^John^D||19750101000000|M
ORC|XO|2|||||^^^20150623000000^^""
OBR|||||||||||||||||||2|2||||
ZDS|1.2.826.0.1.3680043.8.2186.1.2^^Application^DICOM
did clear the Requested Procedure Priority in dcm4chee's MWL.
Unfortunately, this approach leads to exceptions for modality and start_date
see /opt/dcm4chee/dcm4chee-2.18.0-mysql/server/default/log/server.log when sending ORM with "XO" and Scheduled Procedure Step Start Date = ""
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'start_datetime' cannot be null
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
I am not sure that this is a bug (at least not for all fields, some just have to be not null in an order)
I think for some fields you just have to send a ORM with "CA" to delete the order and create a new order with "NW" again.
I read something about that kind of workflow in the
http://www.ihe.net/Technical_Frameworks/#radiology
Hope I could help a bit,
Cheers
ivo