@Override public String toString() { return "Access rules for " + (this.patient != null ? this.patient.getDocument() : "<unknown patient>"); } }
@Override public Patient load(DocumentModelBridge document) throws IllegalArgumentException { // If the caller already has access to the document, then it's safe to proceed return this.internalService.load(document); }
/** * Returns string as stored in the family members list. */ private String patientLinkString(Patient patient) { return patient.getId(); }
@Override public <T> PatientData<T> getData(String name) { return this.patient.getData(name); }
private static String observedStatusToJSONString(Feature feature) { if (feature.isPresent()) { return ApiConfiguration.JSON_FEATURE_OBSERVED_YES; } return ApiConfiguration.JSON_FEATURE_OBSERVED_NO; }
@Override public Set<? extends Feature> getFeatures() { return this.patient.getFeatures(); }
@Override public JSONObject toJSON() { return this.patient.toJSON(); }
/** * Checks if a specific consent is given for the patient record. If consentId is not configured * in the system returns {@code false} regardless of patient consent status. * * @param patientId record in which to test consent * @param consentId of consent which is to be checked * @return {@code true} if the consent was granted for the patient, otherwise {@code false} */ public boolean hasConsent(String patientId, String consentId) { return this.consentManager.hasConsent(patientId, consentId); }
@Override public String getType() { return this.type.toString(); }
@Override public Document getSecureDocument() { return this.patient.getSecureDocument(); }
private boolean containsRequiredConsents(Set<Consent> missingConsents) { for (Consent consent : missingConsents) { if (consent.isRequired()) { return false; } } return true; }
@Override public EntityReference getDataSpace() { return this.internalService.getDataSpace(); }
@Override public PatientSpecificity getSpecificity(Patient patient) { PatientSpecificity spec = null; spec = this.monarchScorer.getSpecificity(patient); if (spec == null) { spec = this.omimScorer.getSpecificity(patient); } return spec; }
/** * Compute the raw specificity score for a patient. * * @param patient the patient to score * @return a score between {@code 0} and {@code 1}, or {@code -1} if the score cannot be computed by this scorer */ public double getScore(Patient patient) { return this.service.getScore(patient); }
@Override public String getName() { return this.patient.getName(); }
@Override public EntityReference getType() { return this.patient.getType(); }
/** * Returns string as stored in the family members list. */ private String patientLinkString(Patient patient) { return patient.getId(); }
@Override public String getType() { return this.type.toString(); }