String patientId = patient.getIdentifier().get(0).getValue(); String familyName = patient.getName().get(0).getFamily().get(0).getValue(); String gender = patient.getGender();
vs.setId(StringUtils.defaultString(nextVs.getIdentifier().getValue())); vs.setClassName(toClassName(nextVs.getName()));
@Override public String toString() { return "IdentifierDt[" + getValue() + "]"; }
/** * Add a row containing the specified header (left column) and value (right column). * * @param header Text for header column * @param value Concept object */ protected void addRow(String header, IdentifierDt value) { addRow(header, value == null ? "" : value.getValue().toString()); }
/** * Returns a patient's MRN. (What labels should be explicitly considered?) * * @param patient Patient * @return MRN as a string. */ public static String getMRNString(Patient patient) { IdentifierDt identifier = getMRN(patient); return identifier == null ? "" : identifier.getValue(); }
/** * Adds a detail row for a generic object. * * @param header The row header. * @param value The object to add. */ protected void addRowViaObject(String header, Object value) { if (value instanceof String) { addRow(header, (String) value); } else if (value instanceof Date) { addRow(header, (Date) value); } else if (value instanceof IdentifierDt) { addRow(header, ((IdentifierDt) value).getValue()); } else { addRow(header, value == null ? "" : String.valueOf(value)); } }
public static int compareProblemIDs(String id1, String id2) { IdentifierDt ed1 = PCCUtil.parseProblemID(id1); IdentifierDt ed2 = PCCUtil.parseProblemID(id2); int i = ed1.getType().getCodingFirstRep().getCode().compareToIgnoreCase(ed2.getType().getCodingFirstRep().getCode()); if (i == 0) { int v1 = NumberUtils.toInt(ed1.getValue()); int v2 = NumberUtils.toInt(ed2.getValue()); i = v1 == v2 ? 0 : v1 > v2 ? 1 : -1; } return i; }
/** * Creates a CCOW context from the specified patient object. */ @Override public ContextItems toCCOWContext(Patient patient) { IdentifierDt mrn = FhirUtil.getIdentifier(patient.getIdentifier(), IdentifierTypeCodesEnum.MR); contextItems.setItem(CCOW_MRN, mrn == null ? null : mrn.getValue(), "MRN"); contextItems.setItem(CCOW_NAM, patient.getName()); contextItems.setItem(CCOW_SEX, patient.getGender()); contextItems.setItem(CCOW_DOB, patient.getBirthDate()); return contextItems; }
text += " #" + mrn.getValue();
String name = FhirUtil.formatName(patient.getName()); IdentifierDt mrn = FhirUtil.getMRN(patient); lblPatient.setValue(name + " (" + (mrn == null ? "" : mrn.getValue()) + ")"); chkAssociate.setValue(patient.getId().getIdPart());