MC 3.0.3.7171
I've got a client that needs the ^ to be ¬ in the messages. I'm using the results from a SQL Server execution.
How do I tell MC to use the ¬ instead of ^ in the segments?
This code should produce:
MSH|¬~\&|SUNNY CORP|SUNNY CORP|SUNNY CORP|ABC|201408200232||DFT¬P03||P¬T|2.2||||||ASCII ||||
PID|0001||55555¬¬¬¬MRN||DOE¬JOHN¬¬¬¬|
I've got a client that needs the ^ to be ¬ in the messages. I'm using the results from a SQL Server execution.
How do I tell MC to use the ¬ instead of ^ in the segments?
This code should produce:
MSH|¬~\&|SUNNY CORP|SUNNY CORP|SUNNY CORP|ABC|201408200232||DFT¬P03||P¬T|2.2||||||ASCII ||||
PID|0001||55555¬¬¬¬MRN||DOE¬JOHN¬¬¬¬|
Code:
//Build the MSH segment
msg['MSH']['MSH.1'] = "|";
msg['MSH']['MSH.2'] = "¬~\\&";
msg['MSH']['MSH.3'] = "SUNNY CORP";
msg['MSH']['MSH.4'] = "SUNNY CORP";
msg['MSH']['MSH.5'] = "SUNNY CORP";
msg['MSH']['MSH.6'] = "ABC";
msg['MSH']['MSH.7'] = creationDate;
msg['MSH']['MSH.9'] = "DFT¬P03";
msg['MSH']['MSH.10'] = TransactionID;
msg['MSH']['MSH.11'] = "P¬T";
msg['MSH']['MSH.12'] = "2.2";
msg['MSH']['MSH.18'] = "ASCII";
//Build the PID
msg['PID']['PID.1'] = "0001";
msg['PID']['PID.2']['PID.2.1'] = PatientMedicalRecordNumber;
msg['PID']['PID.2']['PID.2.5'] = "MRN";
msg['PID']['PID.5']['PID.5.1'] = PatientLastName;
msg['PID']['PID.5']['PID.5.2'] = PatientFirstName;
msg['PID']['PID.5']['PID.5.3'] = PatientMiddleName
hl7_xml = msg;
temptemp = SerializerFactory.getSerializer('HL7V2').fromXML(msg);
stringToWrite = "\n" + temptemp;
FileUtil.write("/folders/ABC/" + tempFileName, true, stringToWrite);
Replace ^ with ¬ in javascript
0 commentaires:
Enregistrer un commentaire