예제 #1
0
        private void btnRender_Click(object sender, EventArgs e)
        {
            II ii = new II();
            // Determine if null flavor should be attached to the object
            if (cbxNullFlavor.SelectedItem != null)
                switch (cbxNullFlavor.SelectedItem.ToString())
                {
                    case "NAV":
                        ii.NullFlavor = NullFlavor.Unavailable;
                        break;
                    case "OTH":
                        ii.NullFlavor = NullFlavor.Other;
                        break;
                    case "NI":
                        ii.NullFlavor = NullFlavor.NoInformation;
                        break;
                    default:
                        ii.NullFlavor = null;
                        break;
                }

            // Determine if a flavor should be attached
            if (cbxFlavor.SelectedItem != null &&
                cbxFlavor.SelectedItem.ToString() != "None")
                ii.Flavor = cbxFlavor.SelectedItem.ToString();

            // Assign the root and extension
            ii.Root = txtRoot.Text;
            ii.Extension = txtExtension.Text;


            // Represent in txtXml
            txtXml.Text = FormatterHelper.FormatDataType(ii, "II");
        }
예제 #2
0
파일: Utils.cs 프로젝트: oneminot/everest
        /// <summary>
        /// Creates a patient structure
        /// </summary>
        /// <param name="id">The unique identifier</param>
        /// <param name="name">The name of the patient</param>
        /// <param name="addr">The primary address</param>
        /// <param name="telecom">A primary telecom</param>
        /// <returns>A constructed patient structure</returns>
        public static Patient CreatePatient(
                II id,
                EN name,
                AD addr,
                TEL telecom
            )
        {
            // Instantiate the object
            var retVal = new Patient();

            // Populate address
            retVal.Addr = BAG<AD>.CreateBAG(addr);

            // Confidentiality Code
            retVal.ConfidentialityCode = "N";

            // Effective Time of the types
            // High is populated as "Not Applicable"
            retVal.EffectiveTime = new IVL<TS>(
                (TS)DateTime.Now,
                new TS() { NullFlavor = NullFlavor.NotApplicable }
                );

            // Telecom address
            retVal.Telecom = BAG<TEL>.CreateBAG(telecom);

            // Populate the ID
            retVal.Id = SET<II>.CreateSET(id);

            // Status Code
            retVal.StatusCode = RoleStatus.Active;

            // Return result
            return retVal;
        }
예제 #3
0
        internal void AddId(II id)
        {
            if (this.id == null)
            {
                this.id = new List<II>();
            }

            this.id.Add(id);
        }
예제 #4
0
        internal new void SetId(string root, string extension)
        {
            base.id = new List<II>();

            II temp = new II();
            temp.Extension = extension;
            temp.Root = root;

            this.id.Add(temp);
        }
예제 #5
0
        internal void AddId(string root, string extension, string assignedAuthorityName)
        {
            if (this.id == null)
            {
                this.id = new List<II>();
            }

            II temp = new II();
            temp.Extension = extension;
            temp.Root = root;
            temp.AssigningAuthorityName = assignedAuthorityName;
            this.id.Add(temp);
        }
예제 #6
0
 public AdministrativeContactsS()
 {
     this.id   = new IIImpl();
     this.code = new CVImpl();
 }
예제 #7
0
        private static void callServiceWithObject()
        {
            string clientSystemPatientId = "1234567890";
            CDSInput cdsInput = new CDSInput();

            II templateId = new II();
            templateId.root = "2.16.840.1.113883.3.795.11.1.1";
            cdsInput.templateId = new II[] { templateId };

            CDSContext cdsContext = new CDSContext();
            CD preferredLanguage = new CD();
            preferredLanguage.code = "en";
            preferredLanguage.codeSystem = "1.2.3";
            preferredLanguage.displayName = "English";
            cdsContext.cdsInformationRecipientPreferredLanguage = preferredLanguage;
            cdsInput.cdsContext = cdsContext;

            VMR vmr = new VMR();
            cdsInput.vmrInput = vmr;

            II vmrTemplateId = new II();
            vmrTemplateId.root = "2.16.840.1.113883.3.795.11.1.1";
            vmr.templateId = new II[] { vmrTemplateId };

            EvaluatedPerson patient = new EvaluatedPerson();

            II personTemplateId = new II();
            personTemplateId.root = "2.16.840.1.113883.3.795.11.2.1.1";
            patient.templateId = new II[] { personTemplateId };

            II id = new II();
            id.root = "2.16.840.1.113883.3.795.12.100.11";
            id.extension = clientSystemPatientId;
            patient.id = id;

            EvaluatedPersonDemographics demographics = new EvaluatedPersonDemographics();

            TS birthTime = new TS();
            birthTime.value = "20110401";
            demographics.birthTime = birthTime;

            CD gender = new CD();
            gender.code = "F";
            gender.codeSystem = "2.16.840.1.113883.5.1";
            demographics.gender = gender;

            patient.demographics = demographics;
            vmr.patient = patient;

            EvaluatedPersonClinicalStatements statements = new EvaluatedPersonClinicalStatements();
            patient.clinicalStatements = statements;

            SubstanceAdministrationEvent statement1 = getSubstanceAdministrationEvent("185", "20110430");
            SubstanceAdministrationEvent statement2 = getSubstanceAdministrationEvent("184", "20110523");
            SubstanceAdministrationEvent statement3 = getSubstanceAdministrationEvent("183", "20110721");
            SubstanceAdministrationEvent statement4 = getSubstanceAdministrationEvent("182", "20110911");
            SubstanceAdministrationEvent statement5 = getSubstanceAdministrationEvent("181", "20110912");

            statements.substanceAdministrationEvents = new SubstanceAdministrationEvent[] { statement1, statement2, statement3, statement4, statement5 };
            CDSOutput response = getResponse(cdsInput);
            processResponse(response);
        }
예제 #8
0
 public AdjudicatorBillingTaxAccount()
 {
     this.id   = new IIImpl();
     this.code = new CVImpl();
 }
예제 #9
0
 public ToBeRespondedToBy()
 {
     this.telecom  = new TELImpl();
     this.deviceId = new IIImpl();
 }
예제 #10
0
        internal void AddId(string root, string extension)
        {
            if (this.id == null)
            {
                this.id = new List<II>();
            }

            II temp = new II();
            temp.Extension = extension;
            temp.Root = root;

            this.id.Add(temp);
        }
예제 #11
0
파일: IITest.cs 프로젝트: oneminot/everest
 public void R2IIScopeParseTest()
 {
     string ext = Guid.NewGuid().ToString();
     II inti = new II("1.2.3.4.5", ext);
     inti.Scope = IdentifierScope.ObjectIdentifier;
     var actualXml = R2SerializationHelper.SerializeAsString(inti);
     var int2 = R2SerializationHelper.ParseString<II>(actualXml);
     Assert.AreEqual(inti, int2);
 }
예제 #12
0
 public DispensePickup()
 {
     this.id = new IIImpl();
 }
예제 #13
0
 public ActRequest()
 {
     this.id = new IIImpl();
 }
 public RecordTarget()
 {
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #15
0
 public Entry()
 {
     this.typeCode   = new CSImpl();
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #16
0
 public Authorization()
 {
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #17
0
 public HospitalAdmissionMedicationsSectionentriesOptionalComponent3()
 {
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #18
0
 public Organization()
 {
     this.id   = new IIImpl();
     this.name = new STImpl();
     this.addr = new SETImpl <AD, PostalAddress>(typeof(ADImpl));
 }
예제 #19
0
 public void IIExampleTest08()
 {
     II token = new II(Guid.NewGuid());
     token.Extension = "1234";
     token.Displayable = null;
     token.Scope = null;
     Assert.IsFalse(II.IsValidTokenFlavor(token));
 }
예제 #20
0
 public ReasonForVisitSectionComponent3()
 {
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #21
0
 public void IIExampleTest10()
 {
     II bus = new II();
     bus.Root = "1.2.3.4";
     bus.Extension = "1234";
     bus.Scope = 0;
     bus.Displayable = true;
     bus.NullFlavor = null;
     Assert.IsFalse(II.IsValidBusFlavor(bus));
     // testing if token flavor is valid given displayable
 }
예제 #22
0
 public Custodian()
 {
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #23
0
파일: IITest.cs 프로젝트: oneminot/everest
 public void R2IIBasicParseTest()
 {
     string ext = Guid.NewGuid().ToString();
     II inti = new II("1.2.3.4.5", ext);
     var actualXml = R2SerializationHelper.SerializeAsString(inti);
     var int2 = R2SerializationHelper.ParseString<II>(actualXml);
     Assert.AreEqual(inti, int2);
 }
예제 #24
0
 public Organization()
 {
     this.id   = new IIImpl();
     this.name = new STImpl();
     this.addr = new ADImpl();
 }
예제 #25
0
파일: IITest.cs 프로젝트: oneminot/everest
 public void R2IIReliabilitySerializationTest()
 {
     string ext = Guid.NewGuid().ToString();
     II inti = new II("1.2.3.4.5", ext);
     inti.Reliability = IdentifierReliability.IssuedBySystem;
     string expectedXml = String.Format(@"<test xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" root=""1.2.3.4.5"" extension=""{0}"" reliability=""ISS"" xmlns=""urn:hl7-org:v3""/>", ext);
     var actualXml = R2SerializationHelper.SerializeAsString(inti);
     R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml);
 }
예제 #26
0
 public MedicationActivityEntry()
 {
     this.typeCode   = new CSImpl();
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #27
0
 internal void SetId(II id)
 {
     this.id = new List<II>();
     this.id.Add(id);
 }
예제 #28
0
 public void IIExampleTest02()
 {
     II token = new II(Guid.NewGuid());
     II token2 = Guid.NewGuid();
     token.Extension = null;
     token2.Extension = null;
     token.NullFlavor = null;
     token2.NullFlavor = null;
     Assert.IsTrue(token.Validate());
     Assert.IsTrue(token2.Validate());
 }
예제 #29
0
 public Request_3()
 {
     this.classCode = new CSImpl();
     this.id        = new IIImpl();
 }
예제 #30
0
 public void IIExampleTest04()
 {
     II token = new II(Guid.NewGuid());
     token.NullFlavor = NullFlavor.NoInformation;
     Assert.IsFalse(token.Validate());
 }
예제 #31
0
        private static SubstanceAdministrationEvent getSubstanceAdministrationEvent(string clientImmunizationId, string administrationTime)
        {
            II statementTemplateId = new II();
            statementTemplateId.root = "2.16.840.1.113883.3.795.11.9.1.1";

            CD substanceAdminGeneralPurpose = new CD();
            substanceAdminGeneralPurpose.code = "384810002";
            substanceAdminGeneralPurpose.codeSystem = "2.16.840.1.113883.6.5";

            CD substanceCode = new CD();
            substanceCode.code = "08";
            substanceCode.codeSystem = "2.16.840.1.113883.12.292";

            II id = new II();
            id.root = "2.16.840.1.113883.3.795.12.100.10";
            id.extension = clientImmunizationId;

            SubstanceAdministrationEvent statement = new SubstanceAdministrationEvent();
            statement.templateId = new II[] { statementTemplateId };
            statement.id = id;
            statement.substanceAdministrationGeneralPurpose = substanceAdminGeneralPurpose;

            AdministrableSubstance substance = new AdministrableSubstance();
            II substanceId = new II();
            substanceId.root = System.Guid.NewGuid().ToString("D");
            substance.id = substanceId;

            substance.substanceCode = substanceCode;
            statement.substance = substance;

            IVL_TS administrationTimeInterval = new IVL_TS();
            administrationTimeInterval.high = administrationTime;
            administrationTimeInterval.low = administrationTime;
            statement.administrationTimeInterval = administrationTimeInterval;

            return statement;
        }
예제 #32
0
 public void IIExampleTest06()
 {
     II rootExtension = new II();
     rootExtension.Root = "2.16.840.1.11x3883.1.18";
     rootExtension.Extension = "12345";
     rootExtension.NullFlavor = null;
     Assert.IsFalse(II.IsValidOidFlavor(rootExtension));
 }
예제 #33
0
 public PayerPerformerPerformer2()
 {
     this.templateId = new IIImpl();
 }
예제 #34
0
 public HealthcareWorker()
 {
     this.id = new SETImpl <II, Identifier>(typeof(IIImpl));
     this.assignedPersonName = new PNImpl();
     this.assignedPersonAsHealthCareProviderId = new IIImpl();
 }
예제 #35
0
 public void IIExampleTest03()
 {
     II rootExtension = new II(new OID("1.2.3.4.5.6"), "1234");
     rootExtension.NullFlavor = NullFlavor.Unknown;
     Assert.IsFalse(rootExtension.Validate());
 }
예제 #36
0
 public DataEnterer()
 {
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.time       = new TSCDAR1Impl();
 }
예제 #37
0
 public void IIExampleTest05()
 {
     II oidII = new II();
     oidII.Root = "2.16.840.1.113883.1.18";
     oidII.Extension = null;         // Extension should have to be populated
     oidII.NullFlavor = null;        // when an OID is specified
     Assert.IsTrue(II.IsValidOidFlavor(oidII));
 }
예제 #38
0
 public AuthenticatorPerson()
 {
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.name       = new LISTImpl <PN, PersonName>(typeof(PNImpl));
 }
예제 #39
0
 public void IIExampleTest07()
 {
     II token = new II(Guid.NewGuid());
     token.NullFlavor = null;
     Assert.IsTrue(II.IsValidTokenFlavor(token));
 }
예제 #40
0
 public PolicyOrAccount()
 {
     this.id   = new IIImpl();
     this.code = new CVImpl();
 }
예제 #41
0
 public void IIExampleTest9()
 {
     II bus = new II();
     bus.Root = "1.2.3.4";
     bus.Extension = "1234";
     bus.Scope = 0;
     bus.Displayable = null;
     bus.NullFlavor = null;
     Assert.IsTrue(II.IsValidBusFlavor(bus));
     // testing if token flavor is valid given root, extension, and scope
 }
예제 #42
0
 public Formularies()
 {
     this.id    = new IIImpl();
     this.title = new STImpl();
 }
예제 #43
0
 public void IIExampleTest01()
 {
     II rootExtension = new II(new OID("1.2.3.4.5"), "1234");
     II rootExtension2 = new II("1.2.3.4.5.6", "1234");
     rootExtension.NullFlavor = null;
     rootExtension2.NullFlavor = null;
     Console.WriteLine("1= {0}, 2={1}", rootExtension.Root, rootExtension2.Root);
     Assert.IsTrue(rootExtension.Validate());
     Assert.IsTrue(rootExtension2.Validate());
 }
예제 #44
0
 public AuthenticationToken()
 {
     this.id   = new IIImpl();
     this.text = new STImpl();
 }
예제 #45
0
파일: IITest.cs 프로젝트: oneminot/everest
 public void R2IIScopeSerializationTest()
 {
     string ext = Guid.NewGuid().ToString();
     II inti = new II("1.2.3.4.5", ext);
     inti.Scope = IdentifierScope.ObjectIdentifier;
     string expectedXml = String.Format(@"<test xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" root=""1.2.3.4.5"" extension=""{0}"" scope=""OBJ"" xmlns=""urn:hl7-org:v3""/>", ext);
     var actualXml = R2SerializationHelper.SerializeAsString(inti);
     R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml);
 }
예제 #46
0
 public EHRRepository()
 {
     this.id = new IIImpl();
     this.assignedRepositoryName = new STImpl();
     this.representedRepositoryJurisdictionName = new STImpl();
 }
예제 #47
0
파일: IITest.cs 프로젝트: oneminot/everest
 public void R2IIReliabilityParseTest()
 {
     string ext = Guid.NewGuid().ToString();
     II inti = new II("1.2.3.4.5", ext);
     inti.Reliability = IdentifierReliability.IssuedBySystem;
     var actualXml = R2SerializationHelper.SerializeAsString(inti);
     var int2 = R2SerializationHelper.ParseString<II>(actualXml);
     Assert.AreEqual(inti, int2);
 }
예제 #48
0
 public RelatedDocument()
 {
     this.typeCode   = new CSImpl();
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #49
0
파일: IITest.cs 프로젝트: oneminot/everest
 public void R2IIFullParseTest()
 {
     string ext = Guid.NewGuid().ToString();
     II inti = new II("1.2.3.4.5", ext);
     inti.Scope = IdentifierScope.ObjectIdentifier;
     inti.Reliability = IdentifierReliability.VerifiedBySystem;
     inti.IdentifierName = "This is an identifier";
     var actualXml = R2SerializationHelper.SerializeAsString(inti);
     var int2 = R2SerializationHelper.ParseString<II>(actualXml);
     Assert.AreEqual(inti, int2);
 }
예제 #50
0
 public HealthDocumentAttachment_1()
 {
     this.id   = new IIImpl();
     this.code = new CVImpl();
     this.text = new EDImpl <EncapsulatedData>();
 }
예제 #51
0
파일: Class1.cs 프로젝트: CSharpDev/Dev.All
 public All( II a, II b)
 {
     _a = a;
     _b = b;
 }
예제 #52
0
 public MedicationActivityEntry()
 {
     this.typeCode   = new CS_R2Impl <Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Domainvalue.x_ActRelationshipEntry>();
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #53
0
        public void setupCDADocument()
        {
            Config = new cdaConfig();
            moodCode = "EVN";
            classCode = "DOCCLIN";

            typeId = new II("2.16.840.1.113883.1.3", "POCD_HD000040");
        }
예제 #54
0
 public SpecialAuthorizationAdditionalInformationRequest()
 {
     this.id   = new IIImpl();
     this.text = new STImpl();
 }
예제 #55
0
 public FunctionalStatusResultObservationEntry()
 {
     this.typeCode   = new CS_R2Impl <Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Domainvalue.x_ActRelationshipEntry>();
     this.typeId     = new IIImpl();
     this.templateId = new LISTImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #56
0
 public SpecialAuthorizationRequest()
 {
     this.id         = new IIImpl();
     this.code       = new CVImpl();
     this.statusCode = new CSImpl();
 }
예제 #57
0
        internal void AddIdNull(string flavorCode)
        {
            NullFlavor flavorValue;

            switch (flavorCode)
            {
                case "NI":
                    flavorValue = NullFlavor.NoInformation;
                    break;
                case "UNK":
                    flavorValue = NullFlavor.Unknown;
                    break;
                default:
                    flavorValue = NullFlavor.NoInformation;
                    break;
            }
            //this.id = new List<II>();
            II temp = new II();
            temp.NullFlavor = flavorValue;

            this.id.Add(temp);
        }
예제 #58
0
 public Subject()
 {
     this.typeId        = new IIImpl();
     this.templateId    = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.awarenessCode = new CE_R2Impl <Code>();
 }
예제 #59
0
        /// <summary>
        /// Example 69
        /// Creates a patient structure
        /// </summary>
        /// <param name="id">The unique identifier</param>
        /// <param name="name">The name of the patient</param>
        /// <param name="addr">The primary address</param>
        /// <param name="telecom">A primary telecom</param>
        /// <returns>A constructed patient structure</returns>
        public Patient CreatePatient(
                II id,
                EN name,
                AD addr,
                TEL telecom
            )
        {
            try
            {
                // Instantiate the object
                var retVal = new Patient();

                // Populate address
                retVal.Addr = BAG<AD>.CreateBAG(addr);

                // Confidentiality Code
                retVal.ConfidentialityCode = "N";

                // Effective Time of the types
                // High is populated as "Not Applicable"
                retVal.EffectiveTime = new IVL<TS>(
                    (TS)DateTime.Now,
                    new TS() { NullFlavor = NullFlavor.NotApplicable }
                    );

                // Telecom address
                retVal.Telecom = BAG<TEL>.CreateBAG(telecom);

                // Populate the ID
                retVal.Id = SET<II>.CreateSET(id);

                // Status Code
                retVal.StatusCode = RoleStatus.Active;

                // Set entity choice
                retVal.SetPatientEntityChoiceSubject(
                    new Person()
                    {
                        AdministrativeGenderCode = AdministrativeGender.Male,
                        Name = BAG<EN>.CreateBAG(name),
                        BirthTime = DateTime.Now
                    }
                    );

                // cannot return result for unit test purposes
                return retVal;
            }
            catch
            {
                Console.WriteLine("Unit tests must not return a value, but Patient must be returned..");
                return new Patient();
            }
        }
예제 #60
0
        /// <summary>
        /// Example 68
        /// Creates a patient structure
        /// </summary>
        /// <param name="id">The unique identifier</param>
        /// <param name="name">The name of the patient</param>
        /// <param name="addr">The primary address</param>
        /// <param name="telecom">A primary telecom</param>
        /// <returns>A constructed patient structure</returns>
        public Patient CreatePatient(
                II id,
                EN name,
                AD addr,
                TEL telecom
            )
        {
            // Instantiate the object
            var retVal = new Patient();

            // return a value in a unit test
            // will result in Not Runnable
            return retVal;
        }