Esempio n. 1
0
        public ParticipantObjectIdentificationType(ParticipantObjectTypeCodeEnum?type,
                                                   ParticipantObjectTypeCodeRoleEnum?role,
                                                   ParticipantObjectDataLifeCycleEnum?lifeCycle,
                                                   string participantObjectId,
                                                   ParticipantObjectIdTypeCodeEnum typeCode)
        {
            if (type.HasValue)
            {
                ParticipantObjectTypeCode          = (byte)type.Value;
                ParticipantObjectTypeCodeSpecified = true;
            }
            else
            {
                ParticipantObjectTypeCodeSpecified = false;
            }

            if (role.HasValue)
            {
                ParticipantObjectTypeCodeRole          = (byte)role.Value;
                ParticipantObjectTypeCodeRoleSpecified = true;
            }
            else
            {
                ParticipantObjectTypeCodeRoleSpecified = false;
            }

            if (lifeCycle.HasValue)
            {
                ParticipantObjectDataLifeCycle          = (byte)lifeCycle.Value;
                ParticipantObjectDataLifeCycleSpecified = true;
            }
            else
            {
                ParticipantObjectDataLifeCycleSpecified = false;
            }

            ParticipantObjectID = participantObjectId;

            ParticipantObjectIDTypeCode = new ParticipantObjectIdentificationTypeParticipantObjectIDTypeCode(typeCode);
        }
Esempio n. 2
0
		public ParticipantObjectIdentificationType(AuditParticipantObject item)
		{
			if (item.ParticipantObjectTypeCode.HasValue)
			{
				ParticipantObjectTypeCode = (byte) item.ParticipantObjectTypeCode.Value;
				ParticipantObjectTypeCodeSpecified = true;
			}
			else ParticipantObjectTypeCodeSpecified = false;

			if (item.ParticipantObjectTypeCodeRole.HasValue)
			{
				ParticipantObjectTypeCodeRole = (byte) item.ParticipantObjectTypeCodeRole.Value;
				ParticipantObjectTypeCodeRoleSpecified = true;
			}
			else
				ParticipantObjectTypeCodeRoleSpecified = false;

			if (item.ParticipantObjectDataLifeCycle.HasValue)
			{
				ParticipantObjectDataLifeCycle = (byte) item.ParticipantObjectDataLifeCycle.Value;
				ParticipantObjectDataLifeCycleSpecified = true;
			}
			else
				ParticipantObjectDataLifeCycleSpecified = false;

			if (item.ParticipantObjectIdTypeCode.HasValue)
			{
				ParticipantObjectIDTypeCode =
					new ParticipantObjectIdentificationTypeParticipantObjectIDTypeCode(item.ParticipantObjectIdTypeCode.Value);
			}
			else if (item.ParticipantObjectIdTypeCodedValue != null)
			{
				ParticipantObjectIDTypeCode =
					new ParticipantObjectIdentificationTypeParticipantObjectIDTypeCode(item.ParticipantObjectIdTypeCodedValue);
			}

			if (!string.IsNullOrEmpty(item.ParticipantObjectDetail))
			{
				ParticipantObjectDetailString = new string[] {item.ParticipantObjectDetail};
			}

			if (!string.IsNullOrEmpty(item.ParticipantObjectId))
				ParticipantObjectID = item.ParticipantObjectId;

			if (!string.IsNullOrEmpty(item.ParticipantObjectName))
				Item = item.ParticipantObjectName;

			ParticipantObjectDescriptionType description = new ParticipantObjectDescriptionType();
			if (!String.IsNullOrEmpty(item.AccessionNumber))
				description.Accession = new ParticipantObjectDescriptionTypeAccession[] { new ParticipantObjectDescriptionTypeAccession(item.AccessionNumber) };
			if (!String.IsNullOrEmpty(item.MppsUid))
				description.MPPS = new ParticipantObjectDescriptionTypeMPPS[] { new ParticipantObjectDescriptionTypeMPPS(item.MppsUid) };

			if (item.SopClassDictionary != null && item.SopClassDictionary.Count > 0)
			{
				description.SOPClass = new ParticipantObjectDescriptionTypeSOPClass[item.SopClassDictionary.Count];
				List<AuditSopClass> list = new List<AuditSopClass>(item.SopClassDictionary.Values);
				for (int i = 0; i < item.SopClassDictionary.Count; i++)
				{
					description.SOPClass[i] =
						new ParticipantObjectDescriptionTypeSOPClass(list[i].UID, list[i].NumberOfInstances);
				}
			}

			ParticipantObjectDescription = new ParticipantObjectDescriptionType[] { description };

		}
Esempio n. 3
0
		public ParticipantObjectIdentificationType(ParticipantObjectTypeCodeEnum? type, 
			ParticipantObjectTypeCodeRoleEnum? role,
			ParticipantObjectDataLifeCycleEnum? lifeCycle, 
			string participantObjectId, 
			ParticipantObjectIdTypeCodeEnum typeCode)
		{
			if (type.HasValue)
			{
				ParticipantObjectTypeCode = (byte)type.Value;
				ParticipantObjectTypeCodeSpecified = true;
			}
			else ParticipantObjectTypeCodeSpecified = false;

			if (role.HasValue)
			{
				ParticipantObjectTypeCodeRole = (byte)role.Value;
				ParticipantObjectTypeCodeRoleSpecified = true;
			}
			else
				ParticipantObjectTypeCodeRoleSpecified = false;

			if (lifeCycle.HasValue)
			{
				ParticipantObjectDataLifeCycle = (byte)lifeCycle.Value;
				ParticipantObjectDataLifeCycleSpecified = true;
			}
			else
				ParticipantObjectDataLifeCycleSpecified = false;

			ParticipantObjectID = participantObjectId;

			ParticipantObjectIDTypeCode = new ParticipantObjectIdentificationTypeParticipantObjectIDTypeCode(typeCode);
		}
Esempio n. 4
0
        public ParticipantObjectIdentificationType(AuditParticipantObject item)
        {
            if (item.ParticipantObjectTypeCode.HasValue)
            {
                ParticipantObjectTypeCode          = (byte)item.ParticipantObjectTypeCode.Value;
                ParticipantObjectTypeCodeSpecified = true;
            }
            else
            {
                ParticipantObjectTypeCodeSpecified = false;
            }

            if (item.ParticipantObjectTypeCodeRole.HasValue)
            {
                ParticipantObjectTypeCodeRole          = (byte)item.ParticipantObjectTypeCodeRole.Value;
                ParticipantObjectTypeCodeRoleSpecified = true;
            }
            else
            {
                ParticipantObjectTypeCodeRoleSpecified = false;
            }

            if (item.ParticipantObjectDataLifeCycle.HasValue)
            {
                ParticipantObjectDataLifeCycle          = (byte)item.ParticipantObjectDataLifeCycle.Value;
                ParticipantObjectDataLifeCycleSpecified = true;
            }
            else
            {
                ParticipantObjectDataLifeCycleSpecified = false;
            }

            if (item.ParticipantObjectIdTypeCode.HasValue)
            {
                ParticipantObjectIDTypeCode =
                    new ParticipantObjectIdentificationTypeParticipantObjectIDTypeCode(item.ParticipantObjectIdTypeCode.Value);
            }
            else if (item.ParticipantObjectIdTypeCodedValue != null)
            {
                ParticipantObjectIDTypeCode =
                    new ParticipantObjectIdentificationTypeParticipantObjectIDTypeCode(item.ParticipantObjectIdTypeCodedValue);
            }

            if (!string.IsNullOrEmpty(item.ParticipantObjectDetail))
            {
                ParticipantObjectDetailString = new string[] { item.ParticipantObjectDetail };
            }

            if (!string.IsNullOrEmpty(item.ParticipantObjectId))
            {
                ParticipantObjectID = item.ParticipantObjectId;
            }

            if (!string.IsNullOrEmpty(item.ParticipantObjectName))
            {
                Item = item.ParticipantObjectName;
            }

            ParticipantObjectDescriptionType description = new ParticipantObjectDescriptionType();

            if (!String.IsNullOrEmpty(item.AccessionNumber))
            {
                description.Accession = new ParticipantObjectDescriptionTypeAccession[] { new ParticipantObjectDescriptionTypeAccession(item.AccessionNumber) }
            }
            ;
            if (!String.IsNullOrEmpty(item.MppsUid))
            {
                description.MPPS = new ParticipantObjectDescriptionTypeMPPS[] { new ParticipantObjectDescriptionTypeMPPS(item.MppsUid) }
            }
            ;

            if (item.SopClassDictionary != null && item.SopClassDictionary.Count > 0)
            {
                description.SOPClass = new ParticipantObjectDescriptionTypeSOPClass[item.SopClassDictionary.Count];
                List <AuditSopClass> list = new List <AuditSopClass>(item.SopClassDictionary.Values);
                for (int i = 0; i < item.SopClassDictionary.Count; i++)
                {
                    description.SOPClass[i] =
                        new ParticipantObjectDescriptionTypeSOPClass(list[i].UID, list[i].NumberOfInstances);
                }
            }

            ParticipantObjectDescription = new ParticipantObjectDescriptionType[] { description };
        }
    }