You can use a destination connector type of Database Writer to write data from the input HL7 message to your database.
You can use a second destination connector to generate an output HL7 message based on the input.
You mentioned status -- can you be more explicit? What status, from the database call or something else?
You could add a ZZZ segment to the outbound message to hold whatever status information you need to send.
EDIT:
Here's how to use javascript to add a ZZZ segment.
createSegment('ZZZ', msg);
msg['ZZZ']['ZZZ.1']['ZZZ.1.1'] = "This is ZZZ.1"; // These are a pain to type!
msg['ZZZ']['ZZZ.2']['ZZZ.2.1'] = "Field ZZZ.2 can contain whatever you want";
msg['ZZZ']['ZZZ.3']['ZZZ.3.1'] = "such as date, time, results of database update";