Ejemplo n.º 1
0
        public RegistryPackageType(string id, string name, string[] eiScheme, string[] eiValue, string[] eiId,
                                   string[] eiRegistryObject, string[] eiName, SlotType[] slots, ClassificationType[] classifications,
                                   string status)
        {
            this.Id = id;

            this.Name = new InternationalStringType();
            this.Name.LocalizedString = new LocalizedStringType[1];
            this.Name.LocalizedString[0] = new LocalizedStringType();
            this.Name.LocalizedString[0].Value = name;

            this.Status = status;

            ExternalIdentifierType ei = null;
            this.ExternalIdentifier = new ExternalIdentifierType[eiScheme.Length];
            for (int i = 0; i < eiScheme.Length; i++)
            {
                ei = new ExternalIdentifierType(eiScheme[i], eiValue[i], eiId[i], eiRegistryObject[i], eiName[i]);
                this.ExternalIdentifier[i] = ei;
            }

            if (slots != null)
            {
                this.Slot = slots;
            }

            if (classifications != null)
            {
                this.Classification = classifications;
            }
        }
Ejemplo n.º 2
0
 public static RegistryPackageType CreateRegistryPackage(string id, string name, string[] eiScheme,
                                                         string[] eiValue, string[] eiName, SlotType[] slots, ClassificationType[] classifications, string status)
 {
     RegistryPackageType rp = new RegistryPackageType(id, name, eiScheme, eiValue, null, null,
                                                      eiName, slots, classifications, status);
     return rp;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// creates a submission set containing a document.
        /// The metadata consists of
        ///   (O) Description
        ///   Slots
        ///     (R2)authorInstitution
        ///     (O) authorPerson
        ///     (R2)authorRole
        ///     (R2)authorSpecialty
        ///     (R) submissionTime
        ///   ExternalIdentifiers
        ///     (R) patientId
        ///     (R) sourceId
        ///     (R) uniqueId
        ///   Classifications
        ///     (R) contentTypeCode
        /// </summary>
        /// <param name="sor">SubmitObjectsRequest corresponding to the new document submission</param>
        public static void AddSubmissionSet(SubmitObjectsRequest sor, DocumentPackage package, string submissionSetId)
        {
            string[] eiScheme = new string[3];
            string[] eiValue = new string[3];
            string[] eiName = new string[3];
            string[] eiId = new string[3];
            string[] eiRegistryObject = new string[3];
            eiScheme[0] = GlobalValues.XDSSubmissionSet_patientIdUUID;
            eiScheme[1] = GlobalValues.XDSSubmissionSet_sourceIdUUID;
            eiScheme[2] = GlobalValues.XDSSubmissionSet_uniqueIdUUID;
            eiValue[0] = package.PatientId.ToCx();  //patID  //TODO change these OIDS
            eiValue[1] = package.SourceId; // "1.3.6.1.4.1.21367.2005.3.11";
            eiValue[2] = package.UniqueId; // "1.3.6.1.4.1.21367.2005.3.11.14"

            eiName[0] = "XDSSubmissionSet.patientId";
            eiName[1] = "XDSSubmissionSet.sourceId";
            eiName[2] = "XDSSubmissionSet.uniqueId";

            eiId[0] = "eiId101";
            eiId[1] = "eiId102";
            eiId[2] = "eiId103";

            eiRegistryObject[0] = submissionSetId;
            eiRegistryObject[1] = submissionSetId;
            eiRegistryObject[2] = submissionSetId;

            SlotType[] slots = new SlotType[2];
            string[] values = new string[1];
            values[0] = Extensions.ToHL7Date(DateTime.Now);
            //HL7Time(XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc));
            slots[0] = new SlotType(SlotNameType.submissionTime, values);

            values = new string[package.IntendedRecipients.Count];
            for (int i = 0; i < package.IntendedRecipients.Count; i++)
            {
                values[i] = package.IntendedRecipients[i].ToXONXCNXTN();
            }
            slots[0] = new SlotType(SlotNameType.intendedRecipient, values);

            // Create Classification for authorPerson and authorInstitution:
            // <rim:Classification id="cl08" classificationScheme="urn:uuid:a7058bb9-b4e4-4307-ba5b-e3f0ab85e12d" classifiedObject="SubmissionSet01">
            //    <rim:Slot name="authorPerson">
            //        <rim:ValueList>
            //            <rim:Value>Sherry Dopplemeyer</rim:Value>
            //        </rim:ValueList>
            //    </rim:Slot>
            //    <rim:Slot name="authorInstitution">
            //        <rim:ValueList>
            //            <rim:Value>Cleveland Clinic</rim:Value>
            //            <rim:Value>Berea Community</rim:Value>
            //        </rim:ValueList>
            //    </rim:Slot>
            // </rim:Classification>

            ClassificationType[] classifications = new ClassificationType[2];
            SlotType[] cSlots = new SlotType[3];
            values = new string[package.Author.Institutions.Count];
            for (int i = 0; i < package.Author.Institutions.Count; i++)
            {
                values[i] = package.Author.Institutions[i].ToXON();
            }
            cSlots[0] = new SlotType(SlotNameType.authorInstitution, values);

            values = new string[1];
            values[0] = package.Author.Person.ToXCN();
            cSlots[1] = new SlotType(SlotNameType.authorPerson, values);

            values = new string[1];
            values[0] = package.Author.TelecomAddress.ToXTN();
            cSlots[2] = new SlotType(SlotNameType.authorTelecom, values);

            classifications[0] = new ClassificationType(GlobalValues.XDSSubmissionSet_authorDescriptionUUID,
                submissionSetId, null, null, "cl01", null, cSlots);

            cSlots = new SlotType[1];
            values = new string[1];
            values[0] = package.ContentTypeCode.Scheme;
            cSlots[0] = new SlotType(SlotNameType.codingScheme, values);
            classifications[1] = new ClassificationType(GlobalValues.XDSSubmissionSet_contentTypeCodeUUID,
                submissionSetId, null, package.ContentTypeCode.Code, "cl02",
                package.ContentTypeCode.Label, cSlots);

            sor.RegistryObjectList.RegistryPackages.Add(
                new RegistryPackageType(submissionSetId, "Submission Set",
                eiScheme, eiValue, eiId, eiRegistryObject, eiName, slots, classifications, RegistryEntryStatus.Submitted));
        }