public void RestWsUpdateTransactionTest()
        {
            string            baseUrl     = "http://*****:*****@lifeiminstanceUid";
            transaction.organizationCode = "organizationCode";
            transaction.serviceName      = "serviceName";
            transaction.connectionName   = "bourne1";
            transaction.transDirection   = "inbound";
            transaction.transSize        = 50;
            transaction.patientMrn       = "6125268959";
            transaction.accessionNumber  = "606558125410";
            transaction.studyUid         = "1.2.840.10008";
            transaction.seriesUid        = "1.1.1.1.1";
            transaction.sopUid           = "1.1.1.1.1.1";
            transaction.transStatus      = "Failure";
            transaction.errorCode        = null;
            transaction.errorMessage     = null;
            transaction.transStarted     = "2020-11-26 10:32:00";
            transaction.transFinished    = null;
            transaction.retryAttempt     = 0;
            LiteRestWsRequest liteRestWsRequest =
                new LiteRestWsRequest(transaction, "transaction/" + transactionId, baseUrl, bearerAccessToken);
            object obj        = liteRestWsRequest.UpdateRecord(liteRestWsRequest.GetWsRequest());
            var    jsonString = JsonConvert.SerializeObject(obj);

            Console.Out.WriteLine(jsonString);
            TransactionEntity transactionResponse = JsonConvert.DeserializeObject <TransactionEntity>(jsonString);

            Assert.IsNotNull(transactionResponse.id);
        }
Ejemplo n.º 2
0
        public void RestWsUpdateHl7Test()
        {
            string    baseUrl = "http://*****:*****@lifeimage.com";
            hl7.organizationCode = "organizationCode";
            hl7.serviceName      = "serviceName";
            hl7.connectionName   = "bourne1";
            hl7.patientMrn       = "6125268959";
            hl7.accessionNumber  = "606558125410";
            hl7.hl7Status        = "init";
            hl7.errorCode        = null;
            hl7.errorMessage     = null;
            hl7.hl7Timestamp     = "2020-11-26 10:32:00";
            hl7.retryAttempt     = 0;
            LiteRestWsRequest liteRestWsRequest =
                new LiteRestWsRequest(hl7, "hl7/" + hl7Id, baseUrl, bearerAccessToken);
            object obj        = liteRestWsRequest.UpdateRecord(liteRestWsRequest.GetWsRequest());
            var    jsonString = JsonConvert.SerializeObject(obj);

            Console.Out.WriteLine(jsonString);
            HL7Entity hl7Response = JsonConvert.DeserializeObject <HL7Entity>(jsonString);

            Assert.IsNotNull(hl7Response.id);
        }
Ejemplo n.º 3
0
        public void RestWsSendEmailTest()
        {
            string      baseUrl = "http://*****:*****@lifeimage.com";
            email.organizationCode = "organizationCode";
            email.serviceName      = "serviceName";
            email.connectionName   = "bourne1";
            email.emailTo          = "*****@*****.**";
            email.emailSubject     = "notification";
            email.emailText        =
                "The golden sea its mirror spreads beneath the golden skies, and but a narrow strip between Of land and shadow lies...";
            LiteRestWsRequest liteRestWsRequest =
                new LiteRestWsRequest(email, "email", baseUrl, bearerAccessToken);
            object obj        = liteRestWsRequest.SendEmail(liteRestWsRequest.GetWsRequest());
            var    jsonString = JsonConvert.SerializeObject(obj);

            Console.Out.WriteLine(jsonString);
            EmailEntity emailResponse = JsonConvert.DeserializeObject <EmailEntity>(jsonString);

            Assert.AreEqual(emailResponse.emailStatus, "success");
        }