org.hl7.fhir.dstu3.model.Identifier.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(10.3k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中org.hl7.fhir.dstu3.model.Identifier.getValue()方法的一些代码示例,展示了Identifier.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Identifier.getValue()方法的具体详情如下:
包路径:org.hl7.fhir.dstu3.model.Identifier
类名称:Identifier
方法名:getValue

Identifier.getValue介绍

暂无

代码示例

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

/**
 * Add a row containing the specified header (left column) and value (right column).
 *
 * @param header Text for header column
 * @param value Concept object
 */
protected void addRow(String header, Identifier value) {
  addRow(header, value == null ? "" : value.getValue().toString());
}

代码示例来源:origin: jamesagnew/hapi-fhir

if (Utilities.noString(reference.getIdentifier().getSystem()) && Utilities.noString(reference.getIdentifier().getValue())) {
  warning(errors, IssueType.STRUCTURE, element.line(), element.col(), path, !Utilities.noString(element.getNamedChildValue("display")), "A Reference without an actual reference or identifier should have a display");

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public static String getOID(ValueSet vs) {
 for (Identifier id : vs.getIdentifier()) {
  if ("urn:ietf:rfc:3986".equals(id.getSystem()) && id.hasValue() && id.getValue().startsWith("urn:oid:"))
   return id.getValue().substring(8);
 }
 return null;
}

代码示例来源:origin: jamesagnew/hapi-fhir

public static org.hl7.fhir.dstu2016may.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.dstu2016may.model.Identifier tgt = new org.hl7.fhir.dstu2016may.model.Identifier();
 copyElement(src, tgt);
 tgt.setUse(convertIdentifierUse(src.getUse()));
 tgt.setType(convertCodeableConcept(src.getType()));
 if (src.hasSystem())
  tgt.setSystem(src.getSystem());
 if (src.hasValue())
  tgt.setValue(src.getValue());
 tgt.setPeriod(convertPeriod(src.getPeriod()));
 tgt.setAssigner(convertReference(src.getAssigner()));
 return tgt;
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public static boolean matches(Identifier i1, Identifier i2, MatchProfile profile) {
  if (profile != null) 
    throw new NotImplementedException("Not Implemented Yet");
   
  // in the absence of a profile, we ignore version
  return matches(i1.getSystem(), i2.getSystem(), null) && matches(i1.getValue(), i2.getValue(), null);
}

代码示例来源:origin: jamesagnew/hapi-fhir

public org.hl7.fhir.instance.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.instance.model.Identifier tgt = new org.hl7.fhir.instance.model.Identifier();
 copyElement(src, tgt);
 if (src.hasUse())
  tgt.setUse(convertIdentifierUse(src.getUse()));
 if (src.hasType())
  tgt.setType(convertCodeableConcept(src.getType()));
 if (src.hasSystem())
  tgt.setSystem(src.getSystem());
 if (src.hasValue())
  tgt.setValue(src.getValue());
 if (src.hasPeriod())
  tgt.setPeriod(convertPeriod(src.getPeriod()));
 if (src.hasAssigner())
  tgt.setAssigner(convertReference(src.getAssigner()));
 return tgt;
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public static String getOID(CodeSystem cs) {
 if (cs.hasIdentifier() && "urn:ietf:rfc:3986".equals(cs.getIdentifier().getSystem()) && cs.getIdentifier().hasValue() && cs.getIdentifier().getValue().startsWith("urn:oid:"))
   return cs.getIdentifier().getValue().substring(8);
 return null;
}

代码示例来源:origin: FirelyTeam/fhirstarters

public static void main(String[] theArgs) {
    
    String resourceBody = "{\"resourceType\":\"Patient\",\"identifier\":[{\"system\":\"http://acme.org/MRNs\",\"value\":\"7000135\"}],\"name\":[{\"family\":[\"Simpson\"],\"given\":[\"Homer\",\"J\"]}]}";

    // Create a context
    FhirContext ctx = FhirContext.forDstu3();
    
    // Create a JSON parser
    IParser parser = ctx.newJsonParser();
    Patient pat = parser.parseResource(Patient.class, resourceBody);
    
    List<Identifier> identifiers = pat.getIdentifier();
    String idSystemString = identifiers.get(0).getSystem();
    String idValueString = identifiers.get(0).getValue();
    
    System.out.println(idSystemString + " " + idValueString);
    
  }
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public static void setOID(ValueSet vs, String oid) {
 if (!oid.startsWith("urn:oid:"))
  oid = "urn:oid:" + oid;
 for (Identifier id : vs.getIdentifier()) {
  if ("urn:ietf:rfc:3986".equals(id.getSystem()) && id.hasValue() && id.getValue().startsWith("urn:oid:")) {
   id.setValue(oid);
   return;
  }
 }
 vs.addIdentifier().setSystem("urn:ietf:rfc:3986").setValue(oid);
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

/**
 * Adds a detail row for a generic object.
 *
 * @param header The row header.
 * @param value The object to add.
 */
protected void addRowViaObject(String header, Object value) {
  if (value instanceof String) {
    addRow(header, (String) value);
  } else if (value instanceof Date) {
    addRow(header, (Date) value);
  } else if (value instanceof Identifier) {
    addRow(header, ((Identifier) value).getValue());
  } else {
    addRow(header, value == null ? "" : String.valueOf(value));
  }
}

代码示例来源:origin: org.openehealth.ipf.commons/ipf-commons-ihe-fhir-stu3-mhd

public void enrichDatasetFromDocumentManifest(DocumentManifest documentManifest) {
    Reference reference = documentManifest.getSubject();
    getPatientIds().add(reference.getResource() != null ?
        reference.getResource().getIdElement().getValue() :
        reference.getReference());
    // If available, use the documentManifest identifier as documentManifestUuid
    if (!documentManifest.getIdentifier().isEmpty()) {
      this.documentManifestUuid = documentManifest.getIdentifier().get(0).getValue();
    }
  }
}

代码示例来源:origin: org.openehealth.ipf.commons/ipf-commons-ihe-fhir-stu3-mhd

private String getSubjectReference(Resource resource, Function<Resource, Reference> f) {
  Reference reference = f.apply(resource);
  if (reference == null) {
    throw FhirUtils.unprocessableEntity(
        OperationOutcome.IssueSeverity.ERROR,
        OperationOutcome.IssueType.INVALID,
        ErrorCode.UNKNOWN_PATIENT_ID.getOpcode(),
        null,
        "Empty Patient reference in resource %s",
        resource
    );
  }
  // Could be contained resources
  if (reference.getResource() != null) {
    Patient patient = (Patient) reference.getResource();
    return patient.getIdentifier().get(0).getValue();
  }
  return reference.getReference();
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

public static void setOID(CodeSystem cs, String oid) {
 if (!oid.startsWith("urn:oid:"))
   oid = "urn:oid:" + oid;
 if (!cs.hasIdentifier())
  cs.setIdentifier(new Identifier().setSystem("urn:ietf:rfc:3986").setValue(oid));
 else if ("urn:ietf:rfc:3986".equals(cs.getIdentifier().getSystem()) && cs.getIdentifier().hasValue() && cs.getIdentifier().getValue().startsWith("urn:oid:"))
  cs.getIdentifier().setValue(oid);
 else
  throw new Error("unable to set OID on code system");
 
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-api-core

/**
 * Creates a CCOW context from the specified patient object.
 */
@Override
public ContextItems toCCOWContext(Patient patient) {
  Identifier mrn = FhirUtil.getMRN(patient);
  contextItems.setItem(CCOW_MRN, mrn == null ? null : mrn.getValue(), "MRN");
  contextItems.setItem(CCOW_NAM, patient.getName());
  contextItems.setItem(CCOW_SEX, patient.getGender());
  contextItems.setItem(CCOW_DOB, patient.getBirthDate());
  return contextItems;
}

代码示例来源:origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-pixpdq

@Test
public void testSendManualRead() {
  Parameters result = sendManuallyOnInstance("0815", validTargetSystemParameters());
  Parameters.ParametersParameterComponent parameter = result.getParameter().iterator().next();
  assertEquals(ResponseCase.getRESULT_VALUE(), ((Identifier)parameter.getValue()).getValue());
}

代码示例来源:origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-pixpdq

@Test
public void testSendEndpointPixmRead() {
  Parameters result = getProducerTemplate().requestBody("direct:input", validReadParameters(), Parameters.class);
  Parameters.ParametersParameterComponent parameter = result.getParameter().iterator().next();
  assertEquals(ResponseCase.getRESULT_VALUE(), ((Identifier)parameter.getValue()).getValue());
  // Check ATNA Audit
  AbstractMockedAuditMessageQueue sender = getAuditSender();
  assertEquals(2, sender.getMessages().size());
}

代码示例来源:origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-pixpdq

@Test
public void testSendEndpointPixm() {
  Parameters result = getProducerTemplate().requestBody("direct:input", validQueryParameters(), Parameters.class);
  Parameters.ParametersParameterComponent parameter = result.getParameter().iterator().next();
  assertEquals(ResponseCase.getRESULT_VALUE(), ((Identifier)parameter.getValue()).getValue());
  // Check ATNA Audit
  AbstractMockedAuditMessageQueue sender = getAuditSender();
  assertEquals(2, sender.getMessages().size());
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-api-core

query.where(Practitioner.IDENTIFIER.exactly().systemAndIdentifier(id.getSystem(), id.getValue()));
query.where(Practitioner.IDENTIFIER.exactly().systemAndIdentifier(id.getSystem(), id.getValue()));

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-converter

public static org.hl7.fhir.dstu2016may.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.dstu2016may.model.Identifier tgt = new org.hl7.fhir.dstu2016may.model.Identifier();
 copyElement(src, tgt);
 tgt.setUse(convertIdentifierUse(src.getUse()));
 tgt.setType(convertCodeableConcept(src.getType()));
 if (src.hasSystem())
  tgt.setSystem(src.getSystem());
 if (src.hasValue())
  tgt.setValue(src.getValue());
 tgt.setPeriod(convertPeriod(src.getPeriod()));
 tgt.setAssigner(convertReference(src.getAssigner()));
 return tgt;
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-converter

public org.hl7.fhir.instance.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.instance.model.Identifier tgt = new org.hl7.fhir.instance.model.Identifier();
 copyElement(src, tgt);
 if (src.hasUse())
  tgt.setUse(convertIdentifierUse(src.getUse()));
 if (src.hasType())
  tgt.setType(convertCodeableConcept(src.getType()));
 if (src.hasSystem())
  tgt.setSystem(src.getSystem());
 if (src.hasValue())
  tgt.setValue(src.getValue());
 if (src.hasPeriod())
  tgt.setPeriod(convertPeriod(src.getPeriod()));
 if (src.hasAssigner())
  tgt.setAssigner(convertReference(src.getAssigner()));
 return tgt;
}

相关文章