public CodeableConcept copy() {
   CodeableConcept dst = new CodeableConcept();
   dst.coding = new ArrayList<Coding>();
   for (Coding i : coding) dst.coding.add(i.copy());
   dst.text = text == null ? null : text.copy();
   dst.primary = primary == null ? null : primary.copy();
   return dst;
 }
示例#2
0
 public SecurityEventSourceComponent copy(SecurityEvent e) {
   SecurityEventSourceComponent dst = e.new SecurityEventSourceComponent();
   dst.site = site == null ? null : site.copy();
   dst.identifier = identifier == null ? null : identifier.copy();
   dst.type = new ArrayList<Coding>();
   for (Coding i : type) dst.type.add(i.copy());
   return dst;
 }
示例#3
0
 public static CodeableConcept newCodeableConcept(String code, String system, String display) {
   CodeableConcept cc = new CodeableConcept();
   Coding c = new Coding();
   c.setCode(code);
   c.setSystem(system);
   c.setDisplay(display);
   cc.getCoding().add(c);
   return cc;
 }
示例#4
0
 /**
  * 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 boolean isEmpty() {
   return super.isEmpty()
       && (identifier == null || identifier.isEmpty())
       && (ruleset == null || ruleset.isEmpty())
       && (originalRuleset == null || originalRuleset.isEmpty())
       && (created == null || created.isEmpty())
       && (target == null || target.isEmpty())
       && (provider == null || provider.isEmpty())
       && (organization == null || organization.isEmpty())
       && (subject == null || subject.isEmpty())
       && (coverage == null || coverage.isEmpty())
       && (relationship == null || relationship.isEmpty());
 }
 public boolean isEmpty() {
   return super.isEmpty()
       && (identifier == null || identifier.isEmpty())
       && (request == null || request.isEmpty())
       && (outcome == null || outcome.isEmpty())
       && (disposition == null || disposition.isEmpty())
       && (ruleset == null || ruleset.isEmpty())
       && (originalRuleset == null || originalRuleset.isEmpty())
       && (created == null || created.isEmpty())
       && (organization == null || organization.isEmpty())
       && (requestProvider == null || requestProvider.isEmpty())
       && (requestOrganization == null || requestOrganization.isEmpty());
 }
示例#7
0
 public Coverage copy() {
   Coverage dst = new Coverage();
   copyValues(dst);
   dst.issuer = issuer == null ? null : issuer.copy();
   dst.bin = bin == null ? null : bin.copy();
   dst.period = period == null ? null : period.copy();
   dst.type = type == null ? null : type.copy();
   dst.subscriberId = subscriberId == null ? null : subscriberId.copy();
   if (identifier != null) {
     dst.identifier = new ArrayList<Identifier>();
     for (Identifier i : identifier) dst.identifier.add(i.copy());
   }
   ;
   dst.group = group == null ? null : group.copy();
   dst.plan = plan == null ? null : plan.copy();
   dst.subPlan = subPlan == null ? null : subPlan.copy();
   dst.dependent = dependent == null ? null : dependent.copy();
   dst.sequence = sequence == null ? null : sequence.copy();
   dst.subscriber = subscriber == null ? null : subscriber.copy();
   dst.network = network == null ? null : network.copy();
   if (contract != null) {
     dst.contract = new ArrayList<Reference>();
     for (Reference i : contract) dst.contract.add(i.copy());
   }
   ;
   return dst;
 }
示例#8
0
  public static String hash(String target, String algorithm, Coding coding) {
    MessageDigest md = null;
    try {
      md = MessageDigest.getInstance(algorithm);
    } catch (Exception e) {
      e.printStackTrace();
    }
    byte[] bytes = target.getBytes();
    byte[] byteHash = md.digest(bytes);

    String encodedHash = null;

    switch (coding) {
      case BASE_64:
        encodedHash = Base64.encodeBytes(byteHash);
        break;
      case HEX:
        encodedHash = toHex(byteHash);
        break;
      default:
        throw new IllegalArgumentException("Unsuported coding:" + coding.name());
    }

    return encodedHash;
  }
示例#9
0
 public ProcessResponseNotesComponent copy() {
   ProcessResponseNotesComponent dst = new ProcessResponseNotesComponent();
   copyValues(dst);
   dst.type = type == null ? null : type.copy();
   dst.text = text == null ? null : text.copy();
   return dst;
 }
示例#10
0
 public EnrollmentRequest copy() {
   EnrollmentRequest dst = new EnrollmentRequest();
   copyValues(dst);
   if (identifier != null) {
     dst.identifier = new ArrayList<Identifier>();
     for (Identifier i : identifier) dst.identifier.add(i.copy());
   }
   ;
   dst.ruleset = ruleset == null ? null : ruleset.copy();
   dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
   dst.created = created == null ? null : created.copy();
   dst.target = target == null ? null : target.copy();
   dst.provider = provider == null ? null : provider.copy();
   dst.organization = organization == null ? null : organization.copy();
   dst.subject = subject == null ? null : subject.copy();
   dst.coverage = coverage == null ? null : coverage.copy();
   dst.relationship = relationship == null ? null : relationship.copy();
   return dst;
 }
 public EnrollmentResponse copy() {
   EnrollmentResponse dst = new EnrollmentResponse();
   copyValues(dst);
   if (identifier != null) {
     dst.identifier = new ArrayList<Identifier>();
     for (Identifier i : identifier) dst.identifier.add(i.copy());
   }
   ;
   dst.request = request == null ? null : request.copy();
   dst.outcome = outcome == null ? null : outcome.copy();
   dst.disposition = disposition == null ? null : disposition.copy();
   dst.ruleset = ruleset == null ? null : ruleset.copy();
   dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
   dst.created = created == null ? null : created.copy();
   dst.organization = organization == null ? null : organization.copy();
   dst.requestProvider = requestProvider == null ? null : requestProvider.copy();
   dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy();
   return dst;
 }
示例#12
0
 public boolean isEmpty() {
   return super.isEmpty()
       && (action == null || action.isEmpty())
       && (identifier == null || identifier.isEmpty())
       && (ruleset == null || ruleset.isEmpty())
       && (originalRuleset == null || originalRuleset.isEmpty())
       && (created == null || created.isEmpty())
       && (target == null || target.isEmpty())
       && (provider == null || provider.isEmpty())
       && (organization == null || organization.isEmpty())
       && (request == null || request.isEmpty())
       && (response == null || response.isEmpty())
       && (nullify == null || nullify.isEmpty())
       && (reference == null || reference.isEmpty())
       && (item == null || item.isEmpty())
       && (include == null || include.isEmpty())
       && (exclude == null || exclude.isEmpty())
       && (period == null || period.isEmpty());
 }
示例#13
0
 public PaymentNotice copy() {
   PaymentNotice dst = new PaymentNotice();
   copyValues(dst);
   if (identifier != null) {
     dst.identifier = new ArrayList<Identifier>();
     for (Identifier i : identifier) dst.identifier.add(i.copy());
   }
   ;
   dst.ruleset = ruleset == null ? null : ruleset.copy();
   dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
   dst.created = created == null ? null : created.copy();
   dst.target = target == null ? null : target.copy();
   dst.provider = provider == null ? null : provider.copy();
   dst.organization = organization == null ? null : organization.copy();
   dst.request = request == null ? null : request.copy();
   dst.response = response == null ? null : response.copy();
   dst.paymentStatus = paymentStatus == null ? null : paymentStatus.copy();
   dst.statusDate = statusDate == null ? null : statusDate.copy();
   return dst;
 }
示例#14
0
 public ProcessResponse copy() {
   ProcessResponse dst = new ProcessResponse();
   copyValues(dst);
   if (identifier != null) {
     dst.identifier = new ArrayList<Identifier>();
     for (Identifier i : identifier) dst.identifier.add(i.copy());
   }
   ;
   dst.request = request == null ? null : request.copy();
   dst.outcome = outcome == null ? null : outcome.copy();
   dst.disposition = disposition == null ? null : disposition.copy();
   dst.ruleset = ruleset == null ? null : ruleset.copy();
   dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
   dst.created = created == null ? null : created.copy();
   dst.organization = organization == null ? null : organization.copy();
   dst.requestProvider = requestProvider == null ? null : requestProvider.copy();
   dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy();
   dst.form = form == null ? null : form.copy();
   if (notes != null) {
     dst.notes = new ArrayList<ProcessResponseNotesComponent>();
     for (ProcessResponseNotesComponent i : notes) dst.notes.add(i.copy());
   }
   ;
   if (error != null) {
     dst.error = new ArrayList<Coding>();
     for (Coding i : error) dst.error.add(i.copy());
   }
   ;
   return dst;
 }
示例#15
0
 public SecurityEventParticipantComponent copy(SecurityEvent e) {
   SecurityEventParticipantComponent dst = e.new SecurityEventParticipantComponent();
   dst.role = new ArrayList<CodeableConcept>();
   for (CodeableConcept i : role) dst.role.add(i.copy());
   dst.reference = reference == null ? null : reference.copy();
   dst.userId = userId == null ? null : userId.copy();
   dst.authId = authId == null ? null : authId.copy();
   dst.name = name == null ? null : name.copy();
   dst.requestor = requestor == null ? null : requestor.copy();
   dst.media = media == null ? null : media.copy();
   dst.network = network == null ? null : network.copy(e);
   return dst;
 }
示例#16
0
 public Meta copy() {
   Meta dst = new Meta();
   copyValues(dst);
   dst.versionId = versionId == null ? null : versionId.copy();
   dst.lastUpdated = lastUpdated == null ? null : lastUpdated.copy();
   if (profile != null) {
     dst.profile = new ArrayList<UriType>();
     for (UriType i : profile) dst.profile.add(i.copy());
   }
   ;
   if (security != null) {
     dst.security = new ArrayList<Coding>();
     for (Coding i : security) dst.security.add(i.copy());
   }
   ;
   if (tag != null) {
     dst.tag = new ArrayList<Coding>();
     for (Coding i : tag) dst.tag.add(i.copy());
   }
   ;
   return dst;
 }
 public boolean isEmpty() {
   return super.isEmpty()
       && (identifier == null || identifier.isEmpty())
       && (name == null || name.isEmpty())
       && (type == null || type.isEmpty())
       && (status == null || status.isEmpty())
       && (activePeriod == null || activePeriod.isEmpty())
       && (currency == null || currency.isEmpty())
       && (balance == null || balance.isEmpty())
       && (coveragePeriod == null || coveragePeriod.isEmpty())
       && (subject == null || subject.isEmpty())
       && (owner == null || owner.isEmpty())
       && (description == null || description.isEmpty());
 }
示例#18
0
 public ProcessRequest copy() {
   ProcessRequest dst = new ProcessRequest();
   copyValues(dst);
   dst.action = action == null ? null : action.copy();
   if (identifier != null) {
     dst.identifier = new ArrayList<Identifier>();
     for (Identifier i : identifier) dst.identifier.add(i.copy());
   }
   ;
   dst.ruleset = ruleset == null ? null : ruleset.copy();
   dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
   dst.created = created == null ? null : created.copy();
   dst.target = target == null ? null : target.copy();
   dst.provider = provider == null ? null : provider.copy();
   dst.organization = organization == null ? null : organization.copy();
   dst.request = request == null ? null : request.copy();
   dst.response = response == null ? null : response.copy();
   dst.nullify = nullify == null ? null : nullify.copy();
   dst.reference = reference == null ? null : reference.copy();
   if (item != null) {
     dst.item = new ArrayList<ItemsComponent>();
     for (ItemsComponent i : item) dst.item.add(i.copy());
   }
   ;
   if (include != null) {
     dst.include = new ArrayList<StringType>();
     for (StringType i : include) dst.include.add(i.copy());
   }
   ;
   if (exclude != null) {
     dst.exclude = new ArrayList<StringType>();
     for (StringType i : exclude) dst.exclude.add(i.copy());
   }
   ;
   dst.period = period == null ? null : period.copy();
   return dst;
 }
示例#19
0
 public boolean isEmpty() {
   return super.isEmpty()
       && (issuer == null || issuer.isEmpty())
       && (bin == null || bin.isEmpty())
       && (period == null || period.isEmpty())
       && (type == null || type.isEmpty())
       && (subscriberId == null || subscriberId.isEmpty())
       && (identifier == null || identifier.isEmpty())
       && (group == null || group.isEmpty())
       && (plan == null || plan.isEmpty())
       && (subPlan == null || subPlan.isEmpty())
       && (dependent == null || dependent.isEmpty())
       && (sequence == null || sequence.isEmpty())
       && (subscriber == null || subscriber.isEmpty())
       && (network == null || network.isEmpty())
       && (contract == null || contract.isEmpty());
 }
 public Account copy() {
   Account dst = new Account();
   copyValues(dst);
   if (identifier != null) {
     dst.identifier = new ArrayList<Identifier>();
     for (Identifier i : identifier) dst.identifier.add(i.copy());
   }
   ;
   dst.name = name == null ? null : name.copy();
   dst.type = type == null ? null : type.copy();
   dst.status = status == null ? null : status.copy();
   dst.activePeriod = activePeriod == null ? null : activePeriod.copy();
   dst.currency = currency == null ? null : currency.copy();
   dst.balance = balance == null ? null : balance.copy();
   dst.coveragePeriod = coveragePeriod == null ? null : coveragePeriod.copy();
   dst.subject = subject == null ? null : subject.copy();
   dst.owner = owner == null ? null : owner.copy();
   dst.description = description == null ? null : description.copy();
   return dst;
 }
示例#21
0
 public static Coding makeCoding(String code) throws FHIRException {
   String[] parts = code.split("\\|");
   Coding c = new Coding();
   if (parts.length == 2) {
     c.setSystem(parts[0]);
     c.setCode(parts[1]);
   } else if (parts.length == 3) {
     c.setSystem(parts[0]);
     c.setCode(parts[1]);
     c.setDisplay(parts[2]);
   } else
     throw new FHIRException(
         "Unable to understand the code '" + code + "'. Use the format system|code(|display)");
   return c;
 }
示例#22
0
 public boolean hasError() {
   if (this.error == null) return false;
   for (Coding item : this.error) if (!item.isEmpty()) return true;
   return false;
 }
示例#23
0
 public boolean hasSecurity() {
   if (this.security == null) return false;
   for (Coding item : this.security) if (!item.isEmpty()) return true;
   return false;
 }
示例#24
0
 public boolean hasTag() {
   if (this.tag == null) return false;
   for (Coding item : this.tag) if (!item.isEmpty()) return true;
   return false;
 }
示例#25
0
 public boolean isEmpty() {
   return super.isEmpty()
       && (type == null || type.isEmpty())
       && (text == null || text.isEmpty());
 }