public String getLocationName() { return skinTest != null ? skinTest.getLocation().getName() : null; }
/** * Returns a list of patient objects based on the specified CCOW context. */ @Override protected Location fromCCOWContext(ContextItems contextItems) { Location location = null; try { location = new Location(); //TODO: populate location object from context items return location; } catch (Exception e) { log.error(e); return null; } }
/** * Gets the first repetition for <b>identifier</b> (id), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Unique code or number identifying the location to its users * </p> */ public IdentifierDt getIdentifierFirstRep() { if (getIdentifier().isEmpty()) { return addIdentifier(); } return getIdentifier().get(0); }
/** * Gets the first repetition for <b>telecom</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites * </p> */ public ContactPointDt getTelecomFirstRep() { if (getTelecom().isEmpty()) { return addTelecom(); } return getTelecom().get(0); }
/** * Sets the default location to the specified value. This value is stored in the * LOCATION.DEFAULT property. * * @param location The location. */ public static void setDefaultLocation(Location location) { PropertyUtil.saveValue(PROPERTY_DEFAULT_LOCATION, null, false, location.getId().getIdPart()); }
/** * Encode an encounter to a visit string. * * @param encounter The encounter. * @return The encoded encounter (visit string). */ public static String encode(Encounter encounter) { Location location = ClientUtil.getResource(encounter.getLocationFirstRep().getLocation(), Location.class); String locIEN = location.isEmpty() ? "" : location.getId().getIdPart(); Date date = encounter.getPeriod().getStart(); String sc = getServiceCategory(encounter); String ien = encounter.getId().isEmpty() ? "" : encounter.getId().getIdPart(); return locIEN + VSTR_DELIM + new FMDate(date).getFMDate() + VSTR_DELIM + sc + VSTR_DELIM + ien; }
/** * Adds a given new value for <b>identifier</b> (id) * * <p> * <b>Definition:</b> * Unique code or number identifying the location to its users * </p> * @param theValue The identifier to add (must not be <code>null</code>) */ public Location addIdentifier(IdentifierDt theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getIdentifier().add(theValue); return this; }
/** * Gets the value(s) for <b>description</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * Description of the Location, which helps in finding or referencing the place * </p> */ public String getDescription() { return getDescriptionElement().getValue(); }
/** * @return The location resource corresponding to the location id in context. If caching is enabled, this * resource will be remembered for subsequent calls, and not loaded fresh with each call. */ public Location getLocationResource() { String locationId = getLocationId(); if (locationId != null) { if (enableCaching) { // is the id matching the prior loaded location? if (priorLocation != null && priorLocation.getId() != null) { if (locationId.equals(priorLocation.getId())) { return priorLocation; } } } // find the location priorLocation = session.read().resource(Location.class).withId(locationId).execute(); return priorLocation; } else { priorLocation = null; return null; } }
/** * Adds and returns a new value for <b>identifier</b> (id) * * <p> * <b>Definition:</b> * Unique code or number identifying the location to its users * </p> */ public IdentifierDt addIdentifier() { IdentifierDt newType = new IdentifierDt(); getIdentifier().add(newType); return newType; }
/** * @return The location resource corresponding to the location id in context. If caching is enabled, this * resource will be remembered for subsequent calls, and not loaded fresh with each call. */ public Location getLocationResource() { String locationId = getLocationId(); if (locationId != null) { if (enableCaching) { // is the id matching the prior loaded location? if (priorLocation != null && priorLocation.getId() != null) { if (locationId.equals(priorLocation.getId().getIdPart())) { return priorLocation; } } } // find the location priorLocation = session.read().resource(Location.class).withId(locationId).execute(); return priorLocation; } else { priorLocation = null; return null; } }
/** * Update the display when the location context changes. */ @Override public void committed() { Location location = LocationContext.getActiveLocation(); if (log.isDebugEnabled()) { log.debug("location: " + location); } String text = location == null ? noSelectionMessage : location.getName(); locationHeader.setValue(text); Clients.resize(root); }
/** * Adds the service location to the specified listbox. * * @param location Service location to add. * @param lstLocation Listbox to receive the location. * @return The added list item. */ public static Listitem locationAdd(Location location, Listbox lstLocation) { Listitem item = new Listitem(location.getName()); item.setValue(location); //item.setTooltiptext(location.getDescription()); item.addForward(Events.ON_DOUBLE_CLICK, "btnOK", Events.ON_CLICK); lstLocation.appendChild(item); lstLocation.setDisabled(false); return item; }
sb.append(ClientUtil.getResource(location.getLocation(), Location.class).getName());
@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); Span span = new Span(); span.setSclass(EncounterUtil.isLocked(encounter) ? Constants.SCLASS_LOCKED : null); createCell(item, span); Location location = ClientUtil.getResource(encounter.getLocationFirstRep().getLocation(), Location.class); createCell(item, location == null ? null : location.getName()); createCell(item, encounter.getPeriod().getStart()); createCell(item, encounter.getTypeFirstRep().getCodingFirstRep().getDisplay()); }