public Patient[] match(string ssn) { string request = buildMatchSsnRequest(ssn); string response = (string)cxn.query(request); string rawMsg = extractHL7Message(response); PatientMatchesResponse hl7 = new PatientMatchesResponse(rawMsg); return(hl7.getPatientsForSSN(ssn)); }
public Patient[] match(Patient patient) { //if (!patient.SSN.isValid()) //{ // throw new Exception("Invalid SSN"); //} //need test for valid name? PatientMatchesResponse hl7 = matchPatients(patient); Patient result = hl7.getPatient(0); if (result == null) { return(null); } return(new Patient[] { result }); }