public static void OnDataReceived(string sendername, string data) { // System.Console.WriteLine(sendername); string[] dataArray = data.Split(new char[] { '|' }); Client client = new Client(); VitalSign vs = new VitalSign(); vs.name = new CodedValue() { abbrev = "a", type = "a", value = "a", Value = "a" }; vs.position = "EmptyPosition"; vs.measuredBy = "MeasuredByCup"; vs.dateMeasuredStart = DateTime.Now; vs.dateMeasuredEnd = DateTime.Now; vs.result.value = Convert.ToDouble(dataArray[0],null); vs.result.unit = new CodedValue() { abbrev = "a", type = "a", value = "a" }; vs.comments = "EmptyComments"; client.SaveVitals(vs); }
public string SaveVitals(VitalSign vs) { string documentId = ""; dr.SaveResults(vs); return documentId; }
public int SaveResults(VitalSign result) { string resultID = _indivoClient.Records_X_DocumentsPost(RecordID, null, result.Serialize(), "application/xml", new KeyValuePair<string, object>()); int i = resultID.IndexOf("<Document id="); //string auxs = resultID.Substring(i + 14, 36); //string OtherDocumentID = "e0fa3294-a5f1-45ee-bfc8-f2679a4e07a1"; //_indivoClient.Records_X_Documents_X_Rels_X_X_Put(RecordID, PlanID, "unscheduledResult", OtherDocumentID, new KeyValuePair<string, object>()); return i; }
public static bool LoadFromFile(string fileName, out VitalSign obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); }
public static bool LoadFromFile(string fileName, out VitalSign obj, out System.Exception exception) { return LoadFromFile(fileName, Encoding.UTF8, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an VitalSign object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output VitalSign object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, System.Text.Encoding encoding, out VitalSign obj, out System.Exception exception) { exception = null; obj = default(VitalSign); try { obj = LoadFromFile(fileName, encoding); return true; } catch (System.Exception ex) { exception = ex; return false; } }
public static bool Deserialize(string xml, out VitalSign obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); }
/// <summary> /// Deserializes workflow markup into an VitalSign object /// </summary> /// <param name="xml">string workflow markup to deserialize</param> /// <param name="obj">Output VitalSign object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out VitalSign obj, out System.Exception exception) { exception = null; obj = default(VitalSign); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } }