almost final changes, pending more stuff from HL7