/** * isolate the process of composing the fmp ssn * * @param pat the patient as from the paws patient service * @return textual representation of the fmp ssn */ private String fmpSsn() { String ssn = _pawsPatient.getSSN().substring(0, 3) + "‑" + _pawsPatient.getSSN().substring(3, 5) + "‑" + _pawsPatient.getSSN().substring(5); return (StringUtil.isEmpty(_pawsPatient.getFMP())) ? ssn : _pawsPatient.getFMP() + '/' + ssn; }
/** * traverse the array of telecoms to see if the type representation is that of the passed in * parameter fo phone kind * * @param telecoms an array of telecoms for a patient as from the paws patient service * @param phoneKind a string like "Home Phone" which is the only we we have to find a particular * kind of phone number. too back paws is structured this way because it is a very fragile * process and will crap out if there is a misspelling * @return the desired phone number */ private String getPhone(Telecom[] telecoms, String phoneKind) { for (Telecom tele : telecoms) { if (phoneKind.equalsIgnoreCase(tele.getTelecomType().getRepresentation())) { if (!StringUtil.isEmpty(tele.getValue())) { return tele.getValue().replaceAll(" ", " "); } } } return null; }
/** * mutator for the paws patient id. if the id represents a change to the underlying paws patient, * updates the paws patient * * @param pawsUnitNbr */ public void setPawsPatientId(final String pawsUnitNbr) { if ((!StringUtil.isEmpty(pawsUnitNbr)) && ((null == _pawsPatient) || (!pawsUnitNbr.equals(_pawsPatient.getUnitNumber())))) { _pawsPatient = ServPaws.patient(pawsUnitNbr); } }
/** * accessor for the provider * * @return the provider */ public String getProvider() { return (StringUtil.isEmpty(_provider)) ? null : _provider; // ServPaws.lookupProvider(_provider).getFullName(); }
/** * accessor for meprs description * * @return the meprs decription */ public String getMeprsDescription() { return StringUtil.nonBreaking(_meprsDescription); }
/** * accessor for the clinic * * @return the clinic */ public String getClinic() { return StringUtil.nonBreaking(_clinic); }
/** * accessor for for the call back phone * * @return the callback phone */ public String getCallbackPhone() { return (StringUtil.isEmpty(_callbackPhone)) ? homePhone(_pawsPatient.getTelecoms()) : _callbackPhone; }
/** * accessor for appointment kind * * @return appt kind */ public String getApptKind() { return StringUtil.nonBreaking(_apptKind); }