Skip to content

Instantly share code, notes, and snippets.

@molsches
Created December 20, 2014 01:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save molsches/3a3a421fffe08a366ea6 to your computer and use it in GitHub Desktop.
Save molsches/3a3a421fffe08a366ea6 to your computer and use it in GitHub Desktop.
data.rfv = msg['PV2']['PV2.3']['PV2.3.1'].toString();
data.patientAddress = msg['PID']['PID.11']['PID.11.1'].toString() + (msg['PID']['PID.11']['PID.11.2'].length >= 1 ? (", " + msg['PID']['PID.11']['PID.11.2'].toString()) : "") + ", " + msg['PID']['PID.11']['PID.11.3'].toString() + ", " + msg['PID']['PID.11']['PID.11.4'].toString() + " " + msg['PID']['PID.11']['PID.11.5'].toString();
data.givenName = msg['PID']['PID.5']['PID.5.2'].toString();
data.familyName = msg['PID']['PID.5']['PID.5.1'].toString();
data.middleInitialOrName = msg['PID']['PID.5']['PID.5.3'].toString();
data.dob = new String(DateUtil.convertDate("yyyyMMdd","MM/dd/yyyy HH:mm:ss", msg['PID']['PID.7']['PID.7.1'].toString()));
data.sex = msg['PID']['PID.8']['PID.8.1'].toString();
data.phoneNumber = msg['PID']['PID.13']['PID.13.1'].toString();
data.eventTime = new String(DateUtil.convertDate("yyyyMMddHHmm","MM/dd/yyyy HH:mm:ss",msg['EVN']['EVN.2']['EVN.2.1'].toString()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment