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; }
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; }
public PnRRequest(String sourceID, String submissionSetUID, String patID, String srcPatID) { if (sourceID == null || submissionSetUID == null || patID == null || srcPatID == null) { StringBuilder sb = new StringBuilder(); sb.append("Parameter values must not be null! ("); if (sourceID == null) sb.append("sourceID,"); if (submissionSetUID == null) sb.append("submissionSetUID,"); if (patID == null) sb.append("patID,"); if (srcPatID == null) sb.append("srcPatID,"); sb.setCharAt(sb.length()-1, ')'); throw new IllegalArgumentException(sb.toString()); } this.submissionSetUID = submissionSetUID; patientID = patID; srcPatIDSlot = Util.createSlot(XDSConstants.SLOT_NAME_SOURCE_PATIENT_ID, null, srcPatID); provideAndRegisterDocumentSetRequest = iheFactory.createProvideAndRegisterDocumentSetRequestType(); SubmitObjectsRequest sor = Util.rimFactory.createSubmitObjectsRequest(); registryObjectList = Util.rimFactory.createRegistryObjectListType(); sor.setRegistryObjectList(registryObjectList); provideAndRegisterDocumentSetRequest.setSubmitObjectsRequest(sor); submissionSet = Util.rimFactory.createRegistryPackageType(); submissionSet.setId(SUBMISSION_SET_ID); submissionSet.getExternalIdentifier().add(Util.createExternalIdentifier(nextID(), XDSConstants.UUID_XDSSubmissionSet_uniqueId, SUBMISSION_SET_ID, submissionSetUID, "XDSSubmissionSet.uniqueId")); submissionSet.getExternalIdentifier().add(Util.createExternalIdentifier(nextID(), XDSConstants.UUID_XDSSubmissionSet_patientId, SUBMISSION_SET_ID, patID, "XDSSubmissionSet.patientId")); submissionSet.getExternalIdentifier().add(Util.createExternalIdentifier(nextID(), XDSConstants.UUID_XDSSubmissionSet_sourceId, SUBMISSION_SET_ID, sourceID, "XDSSubmissionSet.sourceId")); registryObjectList.getIdentifiable().add(Util.rimFactory.createRegistryPackage(submissionSet)); submissionSet.getClassification().add(Util.createClassification(nextID(), XDSConstants.UUID_XDSSubmissionSet, SUBMISSION_SET_ID)); }
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; }
public XDSFolder(PnRRequest pnrReq, String uniqueID) { this.pnrRequest = pnrReq; id = pnrReq.nextFolderID(); metadata = Util.rimFactory.createRegistryPackageType(); metadata.setId(id); List<JAXBElement<? extends IdentifiableType>> list = pnrRequest.getRegistryObjectList().getIdentifiable(); list.add(Util.rimFactory.createRegistryPackage(metadata)); metadata.getExternalIdentifier().add(Util.createExternalIdentifier(pnrRequest.nextID(), XDSConstants.UUID_XDSFolder_patientId, id, pnrRequest.getPatientID(), XDS_FOLDER_PATIENT_ID)); metadata.getExternalIdentifier().add(Util.createExternalIdentifier(pnrRequest.nextID(), XDSConstants.UUID_XDSFolder_uniqueId, id, uniqueID, XDS_FOLDER_UNIQUE_ID)); metadata.getClassification().add(Util.createClassification(pnrReq.nextID(), XDSConstants.UUID_XDSFolder, id)); this.uniqueID = uniqueID; assoc = pnrReq.addAssociation(PnRRequest.SUBMISSION_SET_ID, id, XDSConstants.HAS_MEMBER); }
public RegistryPackage toRegistryPackage(RegistryPackageType rpType) throws XDSException { RegistryPackage rp = null; List<ExternalIdentifierType> list = rpType.getExternalIdentifier(); if (list != null) { for (ExternalIdentifierType eiType : list) {