using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; public class DataParse : SingleTon { public void ParsePeopleInfo(string str) { Root6 root = JsonUtility.FromJson(str); if (root != null) { if (root.code == 200) { DataManager.Instance.rowitems2 = root.data.rows; EventCenter.dispatcher.SendMessage(MsgType.OnGetPeopleInfo2, null); } else { Debug.LogError("root.code = " + root.code); } } } public void ParsePeopleHistory(string str) { Root5 root = JsonUtility.FromJson(str); if (root != null) { if (root.code == 200) { //DataManager.Instance.currentTalk = root.data; //EventCenter.dispatcher.SendMessage(MsgType.OnGetTalkMsg, null); } else { Debug.LogError("root.code = " + root.code); } } } public void ParsePeopleTalk(string str) { Root4 root = JsonUtility.FromJson(str); if (root != null) { if (root.code == 200) { DataManager.Instance.currentTalk = root.data; EventCenter.dispatcher.SendMessage(MsgType.OnGetTalkMsg, null); } else { Debug.LogError("root.code = " + root.code); } } } public void ParsePeopleQuestion(string str) { Root3 root = JsonUtility.FromJson(str); if (root != null) { if (root.code == 200) { DataManager.Instance.currentPeoplesQuestion = root.data; EventCenter.dispatcher.SendMessage(MsgType.OnGetPeopleQuetionList, null); } else { Debug.LogError("root.code = " + root.code); } } } public void ParsePeopleList(string str) { Root2 root = JsonUtility.FromJson(str); if (root != null) { if (root.code == 200) { DataManager.Instance.currentPeoplesProgress = root.data; EventCenter.dispatcher.SendMessage(MsgType.OnGetCurrentPeopleProgress, null); } else { Debug.LogError("root.code = " + root.code); } } } public void ParsePeople(string str) { Root root = JsonUtility.FromJson(str); if (root != null) { if (root.code == 200) { DataManager.Instance.peoples = root.data.rows; EventCenter.dispatcher.SendMessage(MsgType.OnGetPeopleInfo, null); } else { Debug.LogError("root.code = " + root.code); } } } } /// /// 病人的个人资料 /// [Serializable] public class RowsItem2 { /// /// /// public int createBy; /// /// /// public string createTime; /// /// /// public int updateBy; /// /// /// public string updateTime; /// /// /// public int id; /// /// /// public int sex; /// /// /// public int age; /// /// /// public int weight; /// /// /// public int height; /// /// 李 /// public string familyName; /// /// 工 /// public string name; /// /// /// public int matrimony; /// /// /// public int childrenNum; /// /// java工程师 /// public string occupation; /// /// /// public int weightExponent; /// /// /// public string type; /// /// /// public string abdominalCircumference; /// /// /// public string diagnosisId; } /// /// 病人的个人资料 /// [Serializable] public class Data2 { /// /// /// public int total; /// /// /// public List rows; } /// /// 病人的个人资料 /// [Serializable] public class Root6 { /// /// /// public int code; /// /// 查询成功 /// public string msg; /// /// /// public Data2 data; } [Serializable] public class DataItem4 { /// /// /// public int createBy; /// /// /// public string createTime; /// /// /// public string updateBy; /// /// /// public string updateTime; /// /// /// public int id; /// /// {"drugAllergy":null,"allergens":"阿莫西林"} /// public string detailInfo; /// /// /// public string type; /// /// 消炎时,过敏 /// public string peculiarity; /// /// /// public int diagnosisId; } [Serializable] public class Root5 { /// /// /// public int code { get; set; } /// /// 操作成功 /// public string msg { get; set; } /// /// /// public List data { get; set; } } [Serializable] public class DataItem3 { /// /// /// public string createBy; /// /// /// public string createTime; /// /// /// public string updateBy; /// /// /// public string updateTime; /// /// /// public int id; /// /// /// public int senderCode; /// /// /// public int backgroundType; /// /// /// public int relationId; /// /// 请问有什么可以帮助您的? /// public string msg; } [Serializable] public class Root4 { /// /// /// public int code; /// /// 操作成功 /// public string msg; /// /// /// public List data; } [Serializable] public class ProblemAnswerRespListItem { /// /// /// public int id; /// /// /// public int problemId; /// /// 没有问题不需要进行治疗。 /// public string replyText; /// /// /// public int replyEvaluate; /// /// /// public string extra; } [Serializable] public class DataItem2 { /// /// /// public int id; /// /// /// public int diagnosisId; /// /// /// public int backgroundType; /// /// /// public int type; /// /// 其他问题 /// public string introduce; /// /// 没啥大问题 /// public string title; /// /// 问题不大 /// public string feedback; /// /// /// public string titleFileIds; /// /// /// public string feedbackFileIds; /// /// /// public List problemAnswerRespList; /// /// /// public string linkRedirectRespList; } [Serializable] public class Root3 { /// /// /// public int code; /// /// 操作成功 /// public string msg; /// /// /// public List data; } [Serializable] public class DataItem { /// /// /// public int createBy; /// /// /// public string createTime; /// /// /// public int updateBy; /// /// /// public string updateTime; /// /// /// public int id; /// /// /// public string bodyTemperature; /// /// /// public string pulse; /// /// /// public string respiratoryRate; /// /// /// public int bloodPressure; /// /// /// public int casesId; /// /// /// public string diagnosisBackgroundId; /// /// /// public string reason; /// /// /// public string illustrate; /// /// /// public int sort; /// /// 初次诊断 /// public string title; /// /// /// public string dateTime; /// /// 诊断背景 /// public string background; /// /// /// public int patientDiagnosis; /// /// /// public string haveProjectId; } [Serializable] public class Root2 { /// /// /// public int code; /// /// 操作成功 /// public string msg; /// /// /// public List data; } /// /// 诊断数据 /// [Serializable] public class RowsItem { /// /// /// public int createBy; /// /// /// public string createTime; /// /// /// public int updateBy; /// /// /// public string updateTime; /// /// 诊断ID /// public int id; /// /// 测试病例 /// public string name; /// /// 汉语 /// public string languageType; /// /// 解刨 /// public string specialty; /// /// /// public List assessmentPoints; /// /// /// public List field; /// /// /// public List difficulty; /// /// /// public string patientId; /// /// /// public string image; /// /// /// public string sex; /// /// /// public string age; /// /// /// public string weight; /// /// /// public string feature; /// /// /// public int haveClothing; /// /// /// public string order; } [Serializable] public class Data { /// /// /// public int total; /// /// /// public List rows; } [Serializable] public class Root { /// /// /// public int code; /// /// 查询成功 /// public string msg; /// /// /// public Data data; }