예제 #1
0
 public ExternalDocument()
 {
     this.classCode     = new CSImpl();
     this.typeId        = new IIImpl();
     this.templateId    = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.id            = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.code          = new CDImpl();
     this.text          = new EDImpl <EncapsulatedData>();
     this.setId         = new IIImpl();
     this.versionNumber = new INTImpl();
 }
예제 #2
0
 public EntryRelationship()
 {
     this.typeCode             = new CSImpl();
     this.inversionInd         = new BLImpl();
     this.contextConductionInd = new BLImpl();
     this.negationInd          = new BLImpl();
     this.typeId         = new IIImpl();
     this.templateId     = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.sequenceNumber = new INTImpl();
     this.seperatableInd = new BLImpl();
 }
예제 #3
0
 public TriggerEvent()
 {
     this.id                                    = new IIImpl();
     this.code                                  = new CVImpl();
     this.effectiveTime                         = new IVLImpl <TS, Interval <PlatformDate> >();
     this.reasonCode                            = new CVImpl();
     this.languageCode                          = new CEImpl();
     this.queryContinuationQueryId              = new IIImpl();
     this.queryContinuationStartResultNumber    = new INTImpl();
     this.queryContinuationContinuationQuantity = new INTImpl();
 }
예제 #4
0
 public CoveredPartyAsPatientPerson()
 {
     this.name = new PNImpl();
     this.administrativeGenderCode = new CVImpl();
     this.birthTime                = new TSImpl();
     this.multipleBirthInd         = new BLImpl();
     this.multipleBirthOrderNumber = new INTImpl();
     this.parentOrGuardianRoleId   = new IIImpl();
     this.parentOrGuardianRoleCode = new CEImpl();
     this.parentOrGuardianRoleRelationshipHolderName = new PNImpl();
 }
예제 #5
0
 public ExternalDocument()
 {
     this.classCode     = new CS_R2Impl <Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Domainvalue.ActClassDocument>();
     this.typeId        = new IIImpl();
     this.templateId    = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.id            = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.code          = new CD_R2Impl <Code>();
     this.text          = new EDImpl <EncapsulatedData>();
     this.setId         = new IIImpl();
     this.versionNumber = new INTImpl();
 }
        public static unsafe void Copy(string dest, INT destIndex, string src, INT srcIndex, INT count)
        {
            fixed(char *sptr = src)
            fixed(char *dptr = dest)
            {
                void *srcPtr  = sptr + (srcIndex * CharSizeInBytes);
                void *destPtr = dptr + (destIndex * CharSizeInBytes);

                Copy(dptr, sptr, count * CharSizeInBytes);
            }
        }
예제 #7
0
 public EntryRelationship()
 {
     this.typeCode             = new CS_R2Impl <Ca.Infoway.Messagebuilder.Model.Cda_ab_shr.Domainvalue.x_ActRelationshipEntryRelationship>();
     this.inversionInd         = new BLImpl();
     this.contextConductionInd = new BLImpl();
     this.negationInd          = new BLImpl();
     this.typeId         = new IIImpl();
     this.templateId     = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.sequenceNumber = new INTImpl();
     this.seperatableInd = new BLImpl();
 }
예제 #8
0
 public Dispense()
 {
     this.code            = new CVImpl();
     this.effectiveTime   = new IVLImpl <TS, Interval <PlatformDate> >();
     this.repeatNumber    = new INTImpl();
     this.quantity        = new PQImpl();
     this.expectedUseTime = new IVLImpl <TS, Interval <PlatformDate> >();
     this.id                  = new IIImpl();
     this.statusCode          = new CSImpl();
     this.confidentialityCode = new SETImpl <CV, Code>(typeof(CVImpl));
     this.inFulfillmentOfSubstanceAdministrationEventId = new SETImpl <II, Identifier>(typeof(IIImpl));
 }
예제 #9
0
        public void INTExamplesTest05()
        {
            bool boolPositive = false;
            INT  num          = 1;

            // testing if valid positive flavor, given positive integer
            if (INT.IsValidPosFlavor(num))
            {
                boolPositive = true;
            }
            Assert.AreNotEqual(boolPositive, false);
        }
예제 #10
0
        public void INTExamplesTest06()
        {
            bool boolPositive = false;
            INT  num          = 1;

            // test for valid negative flavor
            if (INT.IsValidNonNegFlavor(num))
            {
                boolPositive = true;
            }
            Assert.AreEqual(boolPositive, true);
        }
예제 #11
0
 public CareComposition()
 {
     this.id            = new IIImpl();
     this.code          = new CVImpl();
     this.statusCode    = new CSImpl();
     this.effectiveTime = new IVLImpl <TS, Interval <PlatformDate> >();
     this.subject1PatientPatientEntityQuantifiedKindQuantity = new INTImpl();
     this.outcomeDiagnosisEvent                = new List <Ca.Infoway.Messagebuilder.Model.Ab_r02_04_03_shr.Common.Merged.DischargeDiagnosis>();
     this.reasonIndications                    = new List <Ca.Infoway.Messagebuilder.Model.Ab_r02_04_03_shr.Common.Coct_mt120402ca.IIndications>();
     this.subjectOfAnnotationIndicator         = new BLImpl(false);
     this.componentOfPatientCareProvisionEvent = new List <Ca.Infoway.Messagebuilder.Model.Ab_r02_04_03_shr.Common.Coct_mt011001ca.CareCompositions>();
 }
예제 #12
0
 public DocumentInformation()
 {
     this.id                  = new IIImpl();
     this.code                = new CVImpl();
     this.title               = new STImpl();
     this.statusCode          = new CSImpl();
     this.effectiveTime       = new TSImpl();
     this.confidentialityCode = new CVImpl();
     this.versionNumber       = new INTImpl();
     this.custodianAssignedCustodianRepresentedRepositoryId = new IIImpl();
     this.documentationOfServiceEventCode = new CVImpl();
 }
예제 #13
0
 public void ModulusExampleTest01()
 {
     // print all odd numbers
     for (INT i = 0; i < 10; i++)
     {
         if ((i % 2).Equals(1))
         {
             Console.WriteLine("{0} is odd", i);
         }
     }
     Assert.AreEqual(10 % 5 == 0, true);
 }
        public void ArOpsTest01()
        {
            INT  heightCm = 180;
            INT  weightKg = 60;
            INT  bmiInt   = weightKg / (heightCm * heightCm);
            REAL bmi      = (REAL)(weightKg / (heightCm * heightCm));

            Console.WriteLine("BMI Int: " + bmiInt.ToString());
            Console.WriteLine("BMI Real: " + bmi.ToString());
            Assert.IsTrue(bmiInt.Validate());
            Assert.IsTrue(bmi.Validate());
        }
예제 #15
0
        public unsafe static void SwapBytes(void *value, INT bytesCount)
        {
            INT     count;
            ushort *ptr = (ushort *)value;


            count = bytesCount >> 1;
            while (count-- > 0)
            {
                *ptr = SwapBytes(*ptr++);
            }
        }
예제 #16
0
        public void R2INTNullFlavorSerializationTest()
        {
            INT inti = 8;

            inti.Uncertainty     = new REAL(0.93);
            inti.UncertaintyType = QuantityUncertaintyType.Normal;
            inti.NullFlavor      = NullFlavor.PositiveInfinity;
            string expectedXml = @"<test xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" nullFlavor=""PINF"" xmlns=""urn:hl7-org:v3"" />";
            var    actualXml   = R2SerializationHelper.SerializeAsString(inti);

            R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml);
        }
예제 #17
0
    public static void ReverseArraySegment <T> (NativeArray <T> array, INT first, INT last) where T : unmanaged
    {
        int length     = last - first;
        int lengthHalf = length / 2;

        for (int step = 0; step < lengthHalf; step++)
        {
            var tmp = array[first + step];
            array[first + step] = array[last - step];
            array[last - step]  = tmp;
        }
    }
    /// <summary>  </summary>
    public static void GetPositionInsideCell
    (
        FLOAT point, INT numCells, FLOAT worldSize,
        out int lowerCell, out int upperCell, out float normalizedPositionBetweenThoseTwoPoints
    )
    {
        float cellSize     = worldSize / (float)numCells;
        float cellFraction = point / cellSize;

        lowerCell = cellSize < 0f ? (int)math.ceil(cellFraction) : (int)math.floor(cellFraction);
        upperCell = lowerCell < 0 ? lowerCell - 1 : lowerCell + 1;
        normalizedPositionBetweenThoseTwoPoints = (point - (float)lowerCell * cellSize) / cellSize;
    }
예제 #19
0
    public void SetStats(OCStats stats)
    {
        characterName = stats.characterName;
        archetype     = stats.archetype;
        STR           = stats.STR;
        INT           = stats.INT;
        CHA           = stats.CHA;
        portrait      = stats.portrait;

        image.sprite  = portrait;
        nameText.text = characterName;
        statText.text = "S-" + STR.ToString() + " I-" + INT.ToString() + " C-" + CHA.ToString();
    }
예제 #20
0
        public Intcode(List <INT> initialMemory)
        {
            id = nextID;
            nextID++;
            memory = new Dictionary <INT, INT>();
            INT address = 0;

            foreach (INT n in initialMemory)
            {
                memory[address] = n;
                address         = address + 1;
            }
        }
예제 #21
0
 private void Output(INT i)
 {
     output = i;
     if (outputDest != null)
     {
         outputDest.SendInput(i);
     }
     else
     {
         // Console.WriteLine(i);
     }
     sentOutput = true;
 }
예제 #22
0
        public IVLTest()
        {
            //
            // TODO: Add constructor logic here
            //

            for (INT i = 0; i < 10; i++)
            {
                if (i % 2 == 1)
                {
                    Console.WriteLine("{0} is odd", i);
                }
            }
        }
예제 #23
0
 public DocumentInformation()
 {
     this.id                  = new IIImpl();
     this.code                = new CVImpl();
     this.title               = new STImpl();
     this.statusCode          = new CSImpl();
     this.effectiveTime       = new TSImpl();
     this.confidentialityCode = new CVImpl();
     this.versionNumber       = new INTImpl();
     this.custodianAssignedCustodianRepresentedRepositoryId = new IIImpl();
     this.informationRecipient            = new List <Ca.Infoway.Messagebuilder.Model.Ab_r02_04_03_shr.Common.Merged.ToBeSentTo>();
     this.documentationOfServiceEventCode = new CVImpl();
     this.subjectOfClinicalDocumentSubscriptionRequestSubjectAssignedRecipientId = new IIImpl();
 }
예제 #24
0
 public Reference()
 {
     this.typeId                        = new IIImpl();
     this.templateId                    = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.seperatableInd                = new BLImpl();
     this.externalDocumentClassCode     = new CS_R2Impl <Ca.Infoway.Messagebuilder.Model.Ccda_r1_1.Domainvalue.ActClassDocument>();
     this.externalDocumentTypeId        = new IIImpl();
     this.externalDocumentTemplateId    = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.externalDocumentId            = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.externalDocumentCode          = new CD_R2Impl <Code>();
     this.externalDocumentText          = new EDImpl <EncapsulatedData>();
     this.externalDocumentSetId         = new IIImpl();
     this.externalDocumentVersionNumber = new INTImpl();
 }
예제 #25
0
 public GenericQueryParameters()
 {
     this.immunizationPeriodValue     = new IVLImpl <TS, Interval <PlatformDate> >();
     this.includeIssuesIndicatorValue = new BLImpl();
     this.includeNotesIndicatorValue  = new BLImpl();
     this.nextPlannedDosePeriodValue  = new IVLImpl <TS, Interval <PlatformDate> >();
     this.patientBirthDateValue       = new TSImpl();
     this.patientGenderValue          = new CVImpl();
     this.patientIDValue         = new IIImpl();
     this.patientNameValue       = new PNImpl();
     this.renewalPeriodValue     = new IVLImpl <TS, Interval <PlatformDate> >();
     this.vaccineCodeValue       = new CVImpl();
     this.vaccineDoseNumberValue = new INTImpl();
 }
    public static int2 PointToIndex2d(FLOAT2 point, FLOAT2 worldSize, INT width, INT height)
    {
        GetPositionInsideCell(point, new int2 {
            x = width, y = height
        }, worldSize, out int2 lo, out int2 hi, out float2 f);
        int2 index = new int2 {
            x = AboutEqual(f.x, 1f) ? hi.x : lo.x,
            y = AboutEqual(f.y, 1f) ? hi.y : lo.y
        };

        return(math.clamp(index, 0, new int2 {
            x = width - 1, y = height - 1
        }));
    }
예제 #27
0
        public static void reverseTreePath(Node root,
                                           int data)
        {
            IDictionary <int,
                         int> temp = new Dictionary <int,
                                                     int>();

            INT nextpos = new INT();

            nextpos.data = 0;

            reverseTreePathUtil(root, data,
                                temp, 0, nextpos);
        }
 public Reference()
 {
     this.typeId                        = new IIImpl();
     this.templateId                    = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.seperatableInd                = new BLImpl();
     this.externalDocumentClassCode     = new CSImpl();
     this.externalDocumentTypeId        = new IIImpl();
     this.externalDocumentTemplateId    = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.externalDocumentId            = new LISTImpl <II, Identifier>(typeof(IIImpl));
     this.externalDocumentCode          = new CDImpl();
     this.externalDocumentText          = new EDImpl <EncapsulatedData>();
     this.externalDocumentSetId         = new IIImpl();
     this.externalDocumentVersionNumber = new INTImpl();
 }
예제 #29
0
    public static bool findSubstr(string res, string dst, bool sensitive, INT pos = null, int startPos = 0, bool firstOrLast = true)
    {
        if (res.Length < dst.Length)
        {
            return(false);
        }
        // 如果不区分大小写
        if (!sensitive)
        {
            // 全转换为小写
            res = res.ToLower();
            dst = dst.ToLower();
        }
        int posFind      = -1;
        int subLen       = dst.Length;
        int sourceLength = res.Length;
        int searchLength = sourceLength - subLen;
        int start        = firstOrLast ? startPos : searchLength;
        int end          = firstOrLast ? searchLength : startPos;
        int delta        = firstOrLast ? 1 : -1;

        for (int i = start; i != end; i += delta)
        {
            if (Math.Max(start, end) - i < subLen)
            {
                continue;
            }
            int j = 0;
            for (j = 0; j < subLen; ++j)
            {
                if (i + j >= 0 && i + j < sourceLength)
                {
                    if (res[i + j] != dst[j])
                    {
                        break;
                    }
                }
            }
            if (j == subLen)
            {
                posFind = i;
            }
        }
        if (pos != null)
        {
            pos.mValue = posFind;
        }
        return(posFind != -1);
    }
예제 #30
0
        public void R2INTExpressionParseTest()
        {
            INT inti = 8;

            inti.Uncertainty     = new REAL(0.93);
            inti.UncertaintyType = QuantityUncertaintyType.Normal;
            inti.Expression      = new ED(
                System.Text.Encoding.UTF8.GetBytes("i = (10 + 2) / 2 + 2)"),
                "application/mathml+xml"
                );
            var actualXml = R2SerializationHelper.SerializeAsString(inti);
            var int2      = R2SerializationHelper.ParseString <INT>(actualXml);

            Assert.AreEqual(inti, int2);
        }
예제 #31
0
파일: API.cs 프로젝트: jpbruyere/opentk
 internal static extern BOOL RegisterRawInputDevices(
     RawInputDevice[] RawInputDevices,
     INT NumDevices,
     INT Size
 );
예제 #32
0
파일: API.cs 프로젝트: jpbruyere/opentk
 unsafe internal static extern LRESULT DefRawInputProc(IntPtr RawInput, INT Input, UINT SizeHeader);
예제 #33
0
파일: API.cs 프로젝트: jpbruyere/opentk
 internal static extern LRESULT DefRawInputProc(RawInput[] RawInput, INT Input, UINT SizeHeader);
예제 #34
0
        public void ExpressionTest01()
        {
            INT expressionOnly = new INT(){ NullFlavor = NullFlavor.Derived };
                
            XmlDocument mathDoc = new XmlDocument();
            mathDoc.LoadXml(@"<math xmlns='http://www.w3.org/1998/Match/MathML'>
            <mrow>
                <mi>a</mi>
                <mo>&#2062;</mo>
                <msup><mi>x</mi><mn>2</mn></msup>
                <mo>+</mo>
                <mi>b</mi>
                <mo>&#2062;</mo>
                <mi>x</mi>
                <mo>+</mo>
                <mi>c</mi>
            </mrow>
            </math>");

            expressionOnly.Expression = new ED();
            expressionOnly.Expression.XmlData = mathDoc.DocumentElement;
            expressionOnly.Expression.MediaType = "application/mathml+xml";

            Assert.IsTrue(expressionOnly.Validate());
        }
예제 #35
0
파일: PDVTest.cs 프로젝트: oneminot/everest
 public void PDVNullTest()
 {
     PDV<Nullable<Int32>> a = new INT();
     a.Value = null;
     a.NullFlavor = null;
     Assert.IsFalse(a.Validate());
 }
예제 #36
0
파일: PDVTest.cs 프로젝트: oneminot/everest
 public void PDVValueTest()
 {
     PDV<Nullable<Int32>> a = new INT();
     a.Value = 3;
     a.NullFlavor = null;
     Assert.IsTrue(a.Validate());            
 }
예제 #37
0
파일: PDVTest.cs 프로젝트: oneminot/everest
 public void PDVValueNullFlavorTest()
 {
     PDV<Nullable<Int32>> a = new INT();
     a.Value = 3;
     a.NullFlavor = NullFlavor.NotAsked;
     Assert.IsFalse(a.Validate());
 }
예제 #38
0
파일: API.cs 프로젝트: jpbruyere/opentk
 internal static extern INT GetRawInputData(
     HRAWINPUT RawInput,
     GetRawInputDataEnum Command,
     /*[MarshalAs(UnmanagedType.LPStruct)]*/ [Out] out RawInput Data,
     [In, Out] ref INT Size,
     INT SizeHeader
 );
예제 #39
0
파일: API.cs 프로젝트: jpbruyere/opentk
 internal static extern INT GetRegisteredRawInputDevices(
     [Out] RawInput[] RawInputDevices,
     [In, Out] ref INT NumDevices,
     INT cbSize
 );
예제 #40
0
 internal static extern LRESULT CallWindowProc(
     WNDPROC lpPrevWndFunc,
     HWND hWnd,
     INT Msg,
     WPARAM wParam,
     LPARAM lParam
 );
예제 #41
0
 public void INTExamplesTest08()
 {
     INT num = new INT();
     num.Value = null;
     num.NullFlavor = NullFlavor.NotAsked;
     Assert.IsTrue(num.Validate());
 }
예제 #42
0
 public void INTExamplesTest07()
 {
     INT num = new INT();
     num.Value = 9;
     num.NullFlavor = NullFlavor.NotAsked;
     Assert.IsFalse(num.Validate());
 }
예제 #43
0
파일: API.cs 프로젝트: jpbruyere/opentk
 internal static extern INT GetRawInputDeviceList(
     [In, Out] IntPtr RawInputDeviceList,
     [In, Out] ref INT NumDevices,
     INT Size
 );
예제 #44
0
파일: INTTest.cs 프로젝트: oneminot/everest
 public void INTNullFlavorTest()
 {
     INT a = new INT();
     a.Value = null;
     a.NullFlavor = NullFlavor.NotAsked;
     Assert.IsTrue(a.Validate());           
 }
예제 #45
0
파일: API.cs 프로젝트: jpbruyere/opentk
 unsafe internal static extern INT GetRawInputData(
     HRAWINPUT RawInput,
     GetRawInputDataEnum Command,
     RawInput* Data,
     [In, Out] ref INT Size,
     INT SizeHeader
 );
예제 #46
0
파일: INTTest.cs 프로젝트: oneminot/everest
 public void INTValueNullFlavorTest()
 {
     INT a = new INT();
     a.Value = 3;
     a.NullFlavor = NullFlavor.NotAsked;
     Assert.IsFalse(a.Validate()); 
 }
예제 #47
0
파일: INTTest.cs 프로젝트: oneminot/everest
 public void INTNullTest()
 {
     INT a = new INT();
     a.Value = null;
     a.NullFlavor = null;
     Assert.IsFalse(a.Validate()); 
 }
예제 #48
0
파일: INTTest.cs 프로젝트: oneminot/everest
 public void INTValueTest()
 {
     INT a = new INT();
     a.Value = 3;
     a.NullFlavor = null;
     Assert.IsTrue(a.Validate()); 
 }
예제 #49
0
파일: PDVTest.cs 프로젝트: oneminot/everest
 /// <summary>
 /// Ensure that validation succeeds (return TRUE)
 /// When the following values are being populated:
 ///     NullFlavor
 /// And, the following variables are nullified:
 ///     Value       : Initial value
 /// </summary>        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "PDV"), TestMethod]
 public void PDVNullFlavorTest()
 {
     PDV<Nullable<Int32>> a = new INT();
     a.Value = null;
     a.NullFlavor = NullFlavor.NotAsked;
     Assert.IsTrue(a.Validate());
 }
예제 #50
0
 internal void SetVersionNumber(int value)
 {
     this.versionNumber = new INT(value);
 }