private static boolean isJurisdiction(CodeableConcept t) { return t.hasCoding() && ("http://unstats.un.org/unsd/methods/m49/m49.htm".equals(t.getCoding().get(0).getSystem()) || "urn:iso:std:iso:3166".equals(t.getCoding().get(0).getSystem()) || "https://www.usps.com/".equals(t.getCoding().get(0).getSystem())); }
private org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority convertPriorityCode(org.hl7.fhir.instance.model.CodeableConcept priority) { for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ROUTINE; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.URGENT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.STAT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ASAP; } return null; }
private ReferralPriority convertReferralPriorityCode(CodeableConcept priority) { for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.ROUTINE; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.URGENT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.STAT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.ASAP; } return null; }
private org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority convertPriorityCode(org.hl7.fhir.instance.model.CodeableConcept priority) { for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ROUTINE; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.URGENT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.STAT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ASAP; } return null; }
private static boolean isJurisdiction(CodeableConcept t) { return t.hasCoding() && ("http://unstats.un.org/unsd/methods/m49/m49.htm".equals(t.getCoding().get(0).getSystem()) || "urn:iso:std:iso:3166".equals(t.getCoding().get(0).getSystem()) || "https://www.usps.com/".equals(t.getCoding().get(0).getSystem())); }
private boolean hasConcept(org.hl7.fhir.instance.model.CodeableConcept cc, String system, String code) { for (org.hl7.fhir.instance.model.Coding c : cc.getCoding()) { if (system.equals(c.getSystem()) && code.equals(c.getCode())) return true; } return false; }
private boolean hasConcept(org.hl7.fhir.instance.model.CodeableConcept cc, String system, String code) { for (org.hl7.fhir.instance.model.Coding c : cc.getCoding()) { if (system.equals(c.getSystem()) && code.equals(c.getCode())) return true; } return false; }
public static boolean matches(Coding c1, Coding c2, MatchProfile profile) { if (profile != null) throw new NotImplementedException("Not Implemented Yet"); // in the absence of a profile, we ignore version return matches(c1.getSystem(), c2.getSystem(), null) && matches(c1.getCode(), c2.getCode(), null); }
@Override public ValidationResult validateCode(Coding theCode, ValueSet theVs) { String system = theCode.getSystem(); String code = theCode.getCode(); String display = theCode.getDisplay(); return validateCode(system, code, display, theVs); }
/** * Returns the first tag (if any) that has the given system and code, or returns * <code>null</code> if none */ public Coding getTag(String theSystem, String theCode) { for (Coding next : getTag()) { if (ca.uhn.fhir.util.ObjectUtil.equals(next.getSystem(), theSystem) && ca.uhn.fhir.util.ObjectUtil.equals(next.getCode(), theCode)) { return next; } } return null; }
/** * Returns the first security label (if any) that has the given system and code, or returns * <code>null</code> if none */ public Coding getSecurity(String theSystem, String theCode) { for (Coding next : getTag()) { if (ca.uhn.fhir.util.ObjectUtil.equals(next.getSystem(), theSystem) && ca.uhn.fhir.util.ObjectUtil.equals(next.getCode(), theCode)) { return next; } } return null; }
if (isBlank(coding.getCode()) && isBlank(coding.getSystem()) && isBlank(coding.getSystem())) { rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] is of type coding, but none of code, system, and display are populated", linkId); continue; } else if (isBlank(coding.getCode()) && isBlank(coding.getSystem())) { if (type != AnswerFormat.OPENCHOICE) { rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, continue; } else if (isBlank(coding.getCode()) || isBlank(coding.getSystem())) { rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] has a coding, but this coding does not contain a code and system (both must be present, or neither is the question allows {1})", linkId, if (coding.getSystem().equals(valueSet.getCodeSystem().getSystem())) { for (ConceptDefinitionComponent next : valueSet.getCodeSystem().getConcept()) { if (coding.getCode().equals(next.getCode())) { linkId, coding.getSystem(), coding.getCode(), optionsRef);
public org.hl7.fhir.dstu3.model.Coding convertCoding(org.hl7.fhir.instance.model.Coding src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Coding tgt = new org.hl7.fhir.dstu3.model.Coding(); copyElement(src, tgt); tgt.setSystem(src.getSystem()); tgt.setVersion(src.getVersion()); tgt.setCode(src.getCode()); tgt.setDisplay(src.getDisplay()); tgt.setUserSelected(src.getUserSelected()); return tgt; }
public org.hl7.fhir.r4.model.Coding convertCoding(org.hl7.fhir.instance.model.Coding src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Coding tgt = new org.hl7.fhir.r4.model.Coding(); copyElement(src, tgt); tgt.setSystem(src.getSystem()); tgt.setVersion(src.getVersion()); tgt.setCode(src.getCode()); tgt.setDisplay(src.getDisplay()); tgt.setUserSelected(src.getUserSelected()); return tgt; }
private org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority convertPriorityCode(org.hl7.fhir.instance.model.CodeableConcept priority) { for (org.hl7.fhir.instance.model.Coding c : priority.getCoding()) { if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ROUTINE; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.URGENT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.STAT; if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode())) return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ASAP; } return null; }
public static boolean matches(Coding c1, Coding c2, MatchProfile profile) { if (profile != null) throw new NotImplementedException("Not Implemented Yet"); // in the absence of a profile, we ignore version return matches(c1.getSystem(), c2.getSystem(), null) && matches(c1.getCode(), c2.getCode(), null); }
@Override public ValidationResult validateCode(Coding theCode, ValueSet theVs) { String system = theCode.getSystem(); String code = theCode.getCode(); String display = theCode.getDisplay(); return validateCode(system, code, display, theVs); }
/** * Returns the first tag (if any) that has the given system and code, or returns * <code>null</code> if none */ public Coding getTag(String theSystem, String theCode) { for (Coding next : getTag()) { if (ca.uhn.fhir.util.ObjectUtil.equals(next.getSystem(), theSystem) && ca.uhn.fhir.util.ObjectUtil.equals(next.getCode(), theCode)) { return next; } } return null; }
/** * Returns the first security label (if any) that has the given system and code, or returns * <code>null</code> if none */ public Coding getSecurity(String theSystem, String theCode) { for (Coding next : getTag()) { if (ca.uhn.fhir.util.ObjectUtil.equals(next.getSystem(), theSystem) && ca.uhn.fhir.util.ObjectUtil.equals(next.getCode(), theCode)) { return next; } } return null; }
public org.hl7.fhir.dstu3.model.Coding convertCoding(org.hl7.fhir.instance.model.Coding src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Coding tgt = new org.hl7.fhir.dstu3.model.Coding(); copyElement(src, tgt); tgt.setSystem(src.getSystem()); tgt.setVersion(src.getVersion()); tgt.setCode(src.getCode()); tgt.setDisplay(src.getDisplay()); tgt.setUserSelected(src.getUserSelected()); return tgt; }