/** * Gets the first repetition for <b>location</b> (List of locations the patient has been at), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * List of locations at which the patient has been * </p> */ public Location getLocationFirstRep() { if (getLocation().isEmpty()) { return addLocation(); } return getLocation().get(0); }
/** * Sets the value(s), and clears any existing value(s) for <b>type</b> (Specific type of encounter) * * <p> * <b>Definition:</b> * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) * </p> */ public Encounter setType(EncounterTypeEnum theValue) { getType().clear(); addType(theValue); return this; }
/** * Gets the first repetition for <b>identifier</b> (Identifier(s) by which this encounter is known), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * * </p> */ public IdentifierDt getIdentifierFirstRep() { if (getIdentifier().isEmpty()) { return addIdentifier(); } return getIdentifier().get(0); } /**
/** * Gets the first repetition for <b>participant</b> (List of participants involved in the encounter), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * The main practitioner responsible for providing the service * </p> */ public Participant getParticipantFirstRep() { if (getParticipant().isEmpty()) { return addParticipant(); } return getParticipant().get(0); }
@Override public void renderItem(Listitem item, Object data) { Encounter encounter = data instanceof Encounter ? (Encounter) data : parse((String) data); item.setValue(encounter); item.addForward(Events.ON_DOUBLE_CLICK, item.getListbox(), null); item.setImage(EncounterUtil.isLocked(encounter) ? Constants.ICON_LOCKED : null); createCell(item, encounter.getLocation()); createCell(item, encounter.getPeriod()); createCell(item, encounter.getType()); }
@Override public Map<String, String> getDetail() { Map<String, String> details = new HashMap<String, String>(); details.put("startDate", myEncounter.getPeriod().getStart().getValueAsString()); details.put("endDate", myEncounter.getPeriod().getEnd().getValueAsString()); details.put("service", myEncounter.getServiceProvider().getDisplay().getValue()); details.put("type", myEncounter.getTypeFirstRep().getText().getValue()); details.put("status", myEncounter.getStatus().getValueAsString()); details.put("subject", myEncounter.getSubject().getReference().getValue()); return details; }
@Override public String getDescription() { if(myEncounter != null){ String type = myEncounter.getTypeFirstRep().getText().getValue(); String status = myEncounter.getStatus().getValueAsString(); String startDate = myEncounter.getPeriod().getStart().getValueAsString(); String endDate = myEncounter.getPeriod().getEnd().getValueAsString(); return "Encounter: " + type + ": " + status +", "+ startDate + " - " + endDate; } return null; }
/** * Add a value for <b>type</b> (Specific type of encounter) * * <p> * <b>Definition:</b> * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) * </p> */ public BoundCodeableConceptDt<EncounterTypeEnum> addType() { BoundCodeableConceptDt<EncounterTypeEnum> retVal = new BoundCodeableConceptDt<EncounterTypeEnum>(EncounterTypeEnum.VALUESET_BINDER); getType().add(retVal); return retVal; }
/** * Adds and returns a new value for <b>location</b> (List of locations the patient has been at) * * <p> * <b>Definition:</b> * List of locations at which the patient has been * </p> */ public Location addLocation() { Location newType = new Location(); getLocation().add(newType); return newType; }
@Override public String getName() { if(myEncounter != null){ String id = myEncounter.getIdentifierFirstRep().getValue().getValue(); String system = myEncounter.getIdentifierFirstRep().getSystem().getValueAsString(); String service = myEncounter.getServiceProvider().getDisplay().getValue(); return "Encounter: " + id + "/" + system + ": " + service; } return null; }
@Override public IdentifierDt getIdentifier() { if(myEncounter != null){ return myEncounter.getIdentifierFirstRep(); } return null; }
/** * Sets the value(s) for <b>class</b> (inpatient | outpatient | ambulatory | emergency +) * * <p> * <b>Definition:</b> * * </p> */ public Encounter setClassElement(EncounterClassEnum theValue) { getClassElement().setValueAsEnum(theValue); return this; }
/** * Adds and returns a new value for <b>identifier</b> (Identifier(s) by which this encounter is known) * * <p> * <b>Definition:</b> * * </p> */ public IdentifierDt addIdentifier() { IdentifierDt newType = new IdentifierDt(); getIdentifier().add(newType); return newType; }
imgLocked.setVisible(false); } else { String text = encounter.getLocation().isEmpty() ? "" : FhirUtil.getLast(encounter.getLocation()).toString(); lblDate.setValue(encounter.getPeriod() == null ? null : encounter.getPeriod().getStart().toString()); Practitioner provider = EncounterUtil.getCurrentProvider(encounter); lblProvider.setValue(provider == null ? null : provider.getName().toString()); lblServiceCategory.setValue(encounter.getType().toString()); imgLocked.setVisible(EncounterUtil.isLocked(encounter));
/** * Add a value for <b>type</b> (Specific type of encounter) using an enumerated type. This * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory * or contain the desirable codes. If you wish to use codes other than those which are built-in, * you may also use the {@link #addType()} method. * * <p> * <b>Definition:</b> * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) * </p> */ public BoundCodeableConceptDt<EncounterTypeEnum> addType(EncounterTypeEnum theValue) { BoundCodeableConceptDt<EncounterTypeEnum> retVal = new BoundCodeableConceptDt<EncounterTypeEnum>(EncounterTypeEnum.VALUESET_BINDER, theValue); getType().add(retVal); return retVal; }
if (encounter.getLocation() == null) { appendItem(sb, Constants.TX_NO_LOC); if (encounter.getType() == null) { appendItem(sb, Constants.TX_NO_CAT); if (encounter.getPeriod() == null) { appendItem(sb, Constants.TX_NO_DAT); && DateUtil.stripTime(encounter.getPeriod().getStart().getValue()).after(DateUtil.today())) { return Constants.TX_NO_FUT;
/** * Gets the first repetition for <b>type</b> (Specific type of encounter), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) * </p> */ public BoundCodeableConceptDt<EncounterTypeEnum> getTypeFirstRep() { if (getType().size() == 0) { addType(); } return getType().get(0); }