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); }
public void RestWsGetHl7Test() { string baseUrl = "http://localhost:8080/li/lite/ws"; hl7Id = 1; HL7Entity hl7 = new HL7Entity(); LiteRestWsRequest liteRestWsRequest = new LiteRestWsRequest(hl7, "transaction/" + hl7Id, baseUrl, bearerAccessToken); object obj = liteRestWsRequest.GetRecord(hl7Id); var jsonString = JsonConvert.SerializeObject(obj); Console.Out.WriteLine(jsonString); HL7Entity hl7Response = JsonConvert.DeserializeObject <HL7Entity>(jsonString); Assert.IsNotNull(hl7Response.id); }