Tabnine Logo
ExternalIdentifierType
Code IndexAdd Tabnine to your IDE (free)

How to use
ExternalIdentifierType
in
org.dcm4chee.xds2.infoset.rim

Best Java code snippets using org.dcm4chee.xds2.infoset.rim.ExternalIdentifierType (Showing top 14 results out of 315)

origin: org.dcm4che/dcm4chee-xds2-infoset

public static String setExternalIdentifierValue(String urn, String value, RegistryObjectType ro) {
  List<ExternalIdentifierType> list = ro.getExternalIdentifier();
  ExternalIdentifierType ei;
  for ( int i = 0, len = list.size() ; i < len ; i++ ) {
    ei = list.get(i);
    if ( ei.getIdentificationScheme().equals(urn)) {
      String oldValue = ei.getValue();
      ei.setValue(value);
      return oldValue;
    }
  }
  ei = new ExternalIdentifierType();
  ei.setIdentificationScheme(urn);
  ei.setValue(value);
  list.add(ei);
  return null;
}
origin: org.dcm4che/dcm4chee-xds2-src-base

public static ExternalIdentifierType createExternalIdentifier(String id,
    String scheme, String registryObject, String value, String name) {
  ExternalIdentifierType ei = rimFactory.createExternalIdentifierType();
  ei.setId(id);
  ei.setIdentificationScheme(scheme);
  ei.setObjectType("urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExternalIdentifier");
  ei.setRegistryObject(registryObject);
  ei.setValue(value);
  InternationalStringType is = rimFactory.createInternationalStringType();
  LocalizedStringType v = rimFactory.createLocalizedStringType();
  v.setValue(name);
  is.getLocalizedString().add(v);
  ei.setName(is);
  return ei;
}
 
origin: org.dcm4che/dcm4chee-xds2-ws

private String getPatID(ExternalIdentifierType eiType) {
  if (XDSConstants.UUID_XDSDocumentEntry_patientId.equals(eiType.getIdentificationScheme()) ||
      XDSConstants.UUID_XDSFolder_patientId.equals(eiType.getIdentificationScheme()) ||
      XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())
      ) {
    return eiType.getValue() != null ? eiType.getValue() : "";
  }
  return null;
}
origin: org.dcm4che/dcm4chee-xds2-ws

private void copyExternalIdentifierType(Set<ExternalIdentifier> externalIdentifiers, RegistryObjectType roType) {
  if (externalIdentifiers != null) {
    List<ExternalIdentifierType> eiTypes = roType.getExternalIdentifier();
    ExternalIdentifierType eiType;
    for (ExternalIdentifier ei : externalIdentifiers) {
      eiType = factory.createExternalIdentifierType();
      toEbXmlObj(ei, eiType);
      if (ei.getIdentificationScheme() != null) {
        eiType.setIdentificationScheme(ei.getIdentificationScheme().getId());
      } else {
        log.error("IdentificationScheme is null! ExternalIdentifier id:"+ei.getId());
        eiType.setIdentificationScheme("urn:willi:12345-abcd-123");
      }
      eiType.setValue(ei.getValue());
      if (ei.getRegistryObject() != null) {
        eiType.setRegistryObject(ei.getRegistryObject().getId());
      } else {
        log.error("RegistryObject is null! ExternalIdentifier id:"+ei.getId());
        eiType.setRegistryObject("urn:willi:12345-abcd-456");
      }
      eiTypes.add(eiType);
    }
  }
}
origin: org.dcm4che/dcm4chee-xds2-ws

private void copyExternalIdentifier(List<ExternalIdentifierType> list, RegistryObject ro) throws XDSException {
  if (list != null) {
    ExternalIdentifier ei;
    for (ExternalIdentifierType eiType : list) {
      ei = new ExternalIdentifier();
      toPersistenceObj(eiType, ei);
      ei.setIdentificationScheme((ClassificationScheme)
          getRegistryObject(eiType.getIdentificationScheme()));
      ei.setValue(eiType.getValue());
      ei.setRegistryObject(eiType.getRegistryObject() != null ? getRegistryObject(eiType.getRegistryObject()) : ro);
      ro.getExternalIdentifiers().add(ei);
    }
  }
}
origin: org.dcm4che/dcm4chee-xds2-ws

private XADPatient getPatient(ExternalIdentifierType eiType) throws XDSException {
  XADPatient pat = getPatient(eiType.getValue(), cfg.isCreateMissingPIDs());
  if (pat.getIssuerOfPatientID().getNamespaceID() != null) {
    log.debug("XAD PatientID ("+eiType.getValue()+") contains Namespace ID! Corrected in metadata!");
    eiType.setValue(pat.getXADPatientID());
  }
  return pat;
}
private XADPatient getPatient(String pid, boolean createMissing) throws XDSException {
origin: org.dcm4che/dcm4chee-xds2-ws

private static void checkExternalIdentifiers(RegistryObjectType roType,
    List<String> requiredExternalIdentifiers) throws XDSException {
  List<ExternalIdentifierType> eiList = roType.getExternalIdentifier();
  for (ExternalIdentifierType ei : eiList) {
    requiredExternalIdentifiers.remove(ei.getIdentificationScheme());
  }
  if (requiredExternalIdentifiers.size() > 0) 
    throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, 
        "Missing attributes in '"+roType.getId()+"'! codes:"+requiredExternalIdentifiers, null);
}
origin: org.dcm4che/dcm4chee-xds2-infoset

/**
 * Create an instance of {@link ExternalIdentifierType }
 * 
 */
public ExternalIdentifierType createExternalIdentifierType() {
  return new ExternalIdentifierType();
}
origin: org.dcm4che/dcm4chee-xds2-infoset

public static String getExternalIdentifierValue(String urn, RegistryObjectType ro) {
  List<ExternalIdentifierType> list = ro.getExternalIdentifier();
  ExternalIdentifierType ei;
  for ( int i = 0, len = list.size() ; i < len ; i++ ) {
    ei = list.get(i);
    if ( ei.getIdentificationScheme().equals(urn)) {
      return ei.getValue();
    }
  }
  return null;
}
public static String setExternalIdentifierValue(String urn, String value, RegistryObjectType ro) {
origin: org.dcm4che/dcm4chee-xds2-ws

private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) {
  String[] result = new String[]{UNKNOWN, UNKNOWN};
  List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable();
  IdentifiableType obj;
  whole: for (int i=0,len=objs.size() ; i < len ; i++) {
    obj = objs.get(i).getValue();
    if (obj instanceof RegistryPackageType) {
      List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier();
      if (list != null) {
        for (ExternalIdentifierType eiType : list) {
          if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) {
            if (eiType.getValue() != null)
              result[1] = eiType.getValue();
          } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) {
            if (eiType.getValue() != null)
              result[0] = eiType.getValue();
          } else {
            continue;
          }
          if (result[0] != UNKNOWN && result[1] != UNKNOWN)
            break whole;
        }
      }
    
    }
  }
  return result;
}
 
origin: org.dcm4che/dcm4chee-xds2-repository-ws

private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) {
  String[] result = new String[2];
  List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable();
  IdentifiableType obj;
  whole: for (int i=0,len=objs.size() ; i < len ; i++) {
    obj = objs.get(i).getValue();
    if (obj instanceof RegistryPackageType) {
      List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier();
      if (list != null) {
        for (ExternalIdentifierType eiType : list) {
          if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) {
            result[1] = eiType.getValue();
          } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) {
            result[0] = eiType.getValue();
          } else {
            continue;
          }
          if (result[0] != null && result[1] != null)
            break whole;
        }
      }
    }
  }
  return result;
}
origin: org.dcm4che/dcm4chee-xds2-ws

private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) {
  String[] result = new String[2];
  List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable();
  IdentifiableType obj;
  whole: for (int i=0,len=objs.size() ; i < len ; i++) {
    obj = objs.get(i).getValue();
    if (obj instanceof RegistryPackageType) {
      List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier();
      if (list != null) {
        for (ExternalIdentifierType eiType : list) {
          if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) {
            result[1] = eiType.getValue();
          } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) {
            result[0] = eiType.getValue();
          } else {
            continue;
          }
          if (result[0] != null && result[1] != null)
            break whole;
        }
      }
    
    }
  }
  return result;
}
origin: org.dcm4che/dcm4chee-xds2-ws

if (list != null) {
  for (ExternalIdentifierType eiType : list) {
    if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) {
      if (rp == null) {
        XDSValidator.checkSubmissionSetMetadata(rpType);
    } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) {
      if (rp == null) {
        XDSValidator.checkSubmissionSetMetadata(rpType);
        rp = new XDSSubmissionSet();
      ((XDSSubmissionSet)rp).setUniqueId(eiType.getValue());
    } else if (XDSConstants.UUID_XDSFolder_patientId.equals(eiType.getIdentificationScheme())) {
      if (rp == null) {
        XDSValidator.checkFolderMetadata(rpType);
    } else if (XDSConstants.UUID_XDSFolder_uniqueId.equals(eiType.getIdentificationScheme())) {
      if (rp == null){
        XDSValidator.checkFolderMetadata(rpType);
        rp = new XDSFolder();
      ((XDSFolder)rp).setUniqueId(eiType.getValue());
origin: org.dcm4che/dcm4chee-xds2-ws

public ExtrinsicObject toExtrinsicObject(ExtrinsicObjectType eoType) throws XDSException {
  ExtrinsicObject eo;
  XDSDocumentEntry doc = null;
  if (XDSConstants.UUID_XDSDocumentEntry.equals(eoType.getObjectType())) {
    XDSValidator.checkDocumentEntryMetadata(eoType);
    doc = new XDSDocumentEntry();
    eo = doc;
    List<ExternalIdentifierType> list = eoType.getExternalIdentifier();
    if (list != null) {
      for (ExternalIdentifierType eiType : list) {
        if (XDSConstants.UUID_XDSDocumentEntry_patientId.equals(eiType.getIdentificationScheme())) {
          doc.setPatient(getPatient(eiType));
        } else if (XDSConstants.UUID_XDSDocumentEntry_uniqueId.equals(eiType.getIdentificationScheme())) {
          XDSValidator.checkAlreadyExists(eiType.getValue(), eoType, session);
          doc.setUniqueId(eiType.getValue());
        }
      }
    }
    doc.setSourcePatient(getPatient(getSlotValue(eoType, XDSConstants.SLOT_NAME_SOURCE_PATIENT_ID), true));
  } else {
    eo = new ExtrinsicObject();
  }
  toPersistenceObj(eoType, eo);
  eo.setMimeType(eoType.getMimeType());
  return eo;
}
org.dcm4chee.xds2.infoset.rimExternalIdentifierType

Javadoc

ExternalIdentifier is the mapping of the same named interface in ebRIM. It extends RegistryObject.

Java class for ExternalIdentifierType complex type.

The following schema fragment specifies the expected content contained within this class.

 
<complexType name="ExternalIdentifierType"> 
<complexContent> 
<extension base="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}RegistryObjectType"> 
<attribute name="registryObject" use="required" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}referenceURI" /> 
<attribute name="identificationScheme" use="required" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}referenceURI" /> 
<attribute name="value" use="required" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}LongName" /> 
</extension> 
</complexContent> 
</complexType> 

Most used methods

  • getIdentificationScheme
    Gets the value of the identificationScheme property.
  • getValue
    Gets the value of the value property.
  • setIdentificationScheme
    Sets the value of the identificationScheme property.
  • setValue
    Sets the value of the value property.
  • setRegistryObject
    Sets the value of the registryObject property.
  • <init>
  • getRegistryObject
    Gets the value of the registryObject property.
  • setId
  • setName
  • setObjectType

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now