DoctorNetInterface.cpp 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170
  1. #define PHMS_DLL_EXPORTS
  2. #include "DoctorNetInterface.h"
  3. #include "ExternalNetInterface.h"
  4. #include "ErrorCode.h"
  5. #include <map>
  6. #include <string>
  7. #include "NetThreadManager.h"
  8. using namespace std;
  9. int DoctorLogin(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringUsername, const char* stringPassword, const char* stringLanguage, const char* stringSignPath,
  10. const char* stringHospitalInfoPath, const char* stringHospitalPhotoPath, const char* stringCliniqueListPath, const char* stringHospitalListPath, const char* stringDoctorListPath, char* stringIp)
  11. {
  12. if(handle==NULL || stringLocalFilePath==NULL || stringUsername==NULL || stringPassword==NULL || stringLanguage==NULL || stringSignPath==NULL || stringCliniqueListPath==NULL ||
  13. stringHospitalListPath==NULL || stringDoctorListPath==NULL)
  14. {
  15. return COMMON_PARAMETER_NULL;
  16. }
  17. string stringUuid = handle;
  18. CExternalNetInterface* pNetInterface = NULL;
  19. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  20. if(pNetInterface == NULL)
  21. {
  22. //写日志
  23. return COMMON_INVALID_HANDLE;
  24. }
  25. int nRet = PHMS_SUCCESSFUL_RESULT;
  26. string stringServerIp;
  27. nRet = pNetInterface->DoctorLogin(stringLocalFilePath, stringUsername, stringPassword, stringLanguage, stringSignPath, stringHospitalInfoPath, stringHospitalPhotoPath, stringCliniqueListPath,
  28. stringHospitalListPath, stringDoctorListPath, stringServerIp);
  29. if(stringServerIp.size() != 0)
  30. {
  31. strcpy(stringIp, stringServerIp.c_str());
  32. }
  33. return nRet;
  34. }
  35. int UploadSign(NET_HANDLE handle, const char* stringSignPath)
  36. {
  37. if(handle==NULL || stringSignPath==NULL)
  38. {
  39. return COMMON_PARAMETER_NULL;
  40. }
  41. string stringUuid = handle;
  42. CExternalNetInterface* pNetInterface = NULL;
  43. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  44. if(pNetInterface == NULL)
  45. {
  46. //写日志
  47. return COMMON_INVALID_HANDLE;
  48. }
  49. return pNetInterface->UploadSign(stringSignPath);
  50. }
  51. int GetUnanalyzedCaseList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringOwnerId, const char* stringOrderBy, unsigned int nPageTo, unsigned int nPageSize)
  52. {
  53. if(handle==NULL || stringLocalFilePath==NULL || stringOwnerId==NULL || stringOrderBy==NULL)
  54. {
  55. return COMMON_PARAMETER_NULL;
  56. }
  57. string stringUuid = handle;
  58. CExternalNetInterface* pNetInterface = NULL;
  59. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  60. if(pNetInterface == NULL)
  61. {
  62. //写日志
  63. return COMMON_INVALID_HANDLE;
  64. }
  65. return pNetInterface->GetUnanalyzedCaseList(stringLocalFilePath, stringOwnerId, stringOrderBy, nPageTo, nPageSize);
  66. }
  67. int SearchCaseFromServer(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCaseId, const char* stringCaseType, const char* stringCaseSource,
  68. const char* stringCaseState, const char* stringPatientName, const char* stringSenderId, const char* stringReceiverId, const char* stringStartDate, const char* stringEndDate,
  69. const char* stringCheckStartDate, const char* stringCheckEndDate, const char* stringSenderName, const char* stringDiagnostic, const char* stringCaseOrigin, const char* stringYzlb, const char* stringAId,
  70. const char* stringSex, const char* stringOrderBy, const char* stringThirdId, const char* stringLang, const char* stringIsFullName, unsigned int nPageTo, unsigned int nPageSize)
  71. {
  72. if(handle==NULL || stringLocalFilePath==NULL || stringCaseId==NULL || stringCaseType==NULL ||stringCaseSource==NULL || stringCaseState==NULL ||
  73. stringPatientName==NULL || stringSenderId==NULL || stringReceiverId==NULL || stringStartDate==NULL || stringEndDate==NULL || stringCheckStartDate==NULL || stringCheckEndDate==NULL ||
  74. stringSenderName==NULL || stringDiagnostic==NULL || stringCaseOrigin==NULL || stringYzlb==NULL || stringAId==NULL || stringSex==NULL || stringOrderBy==NULL || stringThirdId==NULL || stringLang==NULL)
  75. {
  76. return COMMON_PARAMETER_NULL;
  77. }
  78. string stringUuid = handle;
  79. CExternalNetInterface* pNetInterface = NULL;
  80. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  81. if(pNetInterface == NULL)
  82. {
  83. //写日志
  84. return COMMON_INVALID_HANDLE;
  85. }
  86. return pNetInterface->SearchCaseFromServer(stringLocalFilePath, stringCaseId, stringCaseType, stringCaseSource, stringCaseState, stringPatientName, stringSenderId,
  87. stringReceiverId, stringStartDate, stringEndDate, stringCheckStartDate, stringCheckEndDate, stringSenderName, stringDiagnostic, stringCaseOrigin, stringYzlb, stringAId, stringSex,
  88. stringOrderBy, stringThirdId, stringLang, stringIsFullName, nPageTo, nPageSize);
  89. }
  90. int GetAutoCaseInfo(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCaseType,const char* stringSenderId,const char* stringCaseOrigin)
  91. {
  92. if(handle==NULL || stringLocalFilePath==NULL|| stringCaseType==NULL|| stringSenderId==NULL|| stringCaseOrigin==NULL)
  93. {
  94. return COMMON_PARAMETER_NULL;
  95. }
  96. string stringUuid = handle;
  97. CExternalNetInterface* pNetInterface = NULL;
  98. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  99. if(pNetInterface == NULL)
  100. {
  101. //写日志
  102. return COMMON_INVALID_HANDLE;
  103. }
  104. return pNetInterface->GetAutoCaseInfo(stringLocalFilePath, stringCaseType, stringSenderId, stringCaseOrigin);
  105. }
  106. // int AutoDownloadCase(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCaseId, const char* stringReceiverId, const char* stringUri, unsigned long nFileSize,
  107. // pProgressAndSpeedCallback pCallback)
  108. // {
  109. // if(handle==NULL || stringLocalFilePath==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringUri==NULL)
  110. // {
  111. // return COMMON_PARAMETER_NULL;
  112. // }
  113. // string stringUuid = handle;
  114. // CExternalNetInterface* pNetInterface = NULL;
  115. // pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  116. // if(pNetInterface == NULL)
  117. // {
  118. // //写日志
  119. // return COMMON_INVALID_HANDLE;
  120. // }
  121. // return pNetInterface->AutoDownloadCase(stringLocalFilePath, stringCaseId, stringReceiverId, stringUri, nFileSize, pCallback);
  122. // }
  123. int ManualDownloadCase(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCaseId, const char* stringHospitalId, const char* stringReceiverId, const char* stringUri, unsigned long nFileSize,
  124. pProgressAndSpeedCallback pCallback, int nBDownloadNotSelfOwn)
  125. {
  126. if(handle==NULL || stringLocalFilePath==NULL || stringCaseId==NULL || stringHospitalId==NULL || stringReceiverId==NULL || stringUri==NULL)
  127. {
  128. return COMMON_PARAMETER_NULL;
  129. }
  130. string stringUuid = handle;
  131. CExternalNetInterface* pNetInterface = NULL;
  132. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  133. if(pNetInterface == NULL)
  134. {
  135. //写日志
  136. return COMMON_INVALID_HANDLE;
  137. }
  138. bool bDownloadNotSelfOwn = false;
  139. if(nBDownloadNotSelfOwn == 1)
  140. {
  141. bDownloadNotSelfOwn = true;
  142. }
  143. return pNetInterface->ManualDownloadCase(stringLocalFilePath, stringCaseId, stringHospitalId, stringReceiverId, stringUri, nFileSize, pCallback, bDownloadNotSelfOwn);
  144. }
  145. int RollbackCase(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, const char* stringBackTo)
  146. {
  147. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringBackTo==NULL)
  148. {
  149. return COMMON_PARAMETER_NULL;
  150. }
  151. string stringUuid = handle;
  152. CExternalNetInterface* pNetInterface = NULL;
  153. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  154. if(pNetInterface == NULL)
  155. {
  156. //写日志
  157. return COMMON_INVALID_HANDLE;
  158. }
  159. return pNetInterface->RollbackCase(stringCaseId, stringReceiverId, stringBackTo);
  160. }
  161. int TransmitCase(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, const char* stringForwardToH, const char* stringForwardToHospitalName,
  162. const char* stringForwardToD, const char* stringForwardToDoctorName)
  163. {
  164. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringForwardToH==NULL || stringForwardToHospitalName==NULL ||
  165. stringForwardToD==NULL || stringForwardToDoctorName==NULL)
  166. {
  167. return COMMON_PARAMETER_NULL;
  168. }
  169. string stringUuid = handle;
  170. CExternalNetInterface* pNetInterface = NULL;
  171. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  172. if(pNetInterface == NULL)
  173. {
  174. //写日志
  175. return COMMON_INVALID_HANDLE;
  176. }
  177. return pNetInterface->TransmitCase(stringCaseId, stringReceiverId, stringForwardToH, stringForwardToHospitalName, stringForwardToD, stringForwardToDoctorName);
  178. }
  179. int InvalidCase(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, const char* stringReason)
  180. {
  181. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringReason==NULL)
  182. {
  183. return COMMON_PARAMETER_NULL;
  184. }
  185. string stringUuid = handle;
  186. CExternalNetInterface* pNetInterface = NULL;
  187. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  188. if(pNetInterface == NULL)
  189. {
  190. //写日志
  191. return COMMON_INVALID_HANDLE;
  192. }
  193. return pNetInterface->InvalidCase(stringCaseId, stringReceiverId, stringReason);
  194. }
  195. int AnalyzeBegin(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, const char* stringCaseType)
  196. {
  197. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringCaseType==NULL)
  198. {
  199. return COMMON_PARAMETER_NULL;
  200. }
  201. string stringUuid = handle;
  202. CExternalNetInterface* pNetInterface = NULL;
  203. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  204. if(pNetInterface == NULL)
  205. {
  206. //写日志
  207. return COMMON_INVALID_HANDLE;
  208. }
  209. return pNetInterface->AnalyzeBegin(stringCaseId, stringReceiverId, stringCaseType);
  210. }
  211. int AnalyzeComplete(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, const char* stringCaseType)
  212. {
  213. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringCaseType==NULL)
  214. {
  215. return COMMON_PARAMETER_NULL;
  216. }
  217. string stringUuid = handle;
  218. CExternalNetInterface* pNetInterface = NULL;
  219. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  220. if(pNetInterface == NULL)
  221. {
  222. //写日志
  223. return COMMON_INVALID_HANDLE;
  224. }
  225. return pNetInterface->AnalyzeComplete(stringCaseId, stringReceiverId, stringCaseType);
  226. }
  227. int UploadReport(NET_HANDLE handle, char* stringReportId, const char* stringCaseId, const char* stringReceiverId, const char* stringDiagnosis, const char* stringDigitalSign, const char* stringTimestampSign, const char* stringCaseType, const char* stringLocalReportPath, int nResultFlag,
  228. const char* stringFileType, pProgressAndSpeedCallback pCallback)
  229. {
  230. if(handle==NULL || stringReportId==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringDiagnosis==NULL || stringLocalReportPath==NULL || stringDigitalSign==NULL || stringTimestampSign==NULL || stringCaseType==NULL || stringFileType==NULL)
  231. {
  232. return COMMON_PARAMETER_NULL;
  233. }
  234. string stringUuid = handle;
  235. CExternalNetInterface* pNetInterface = NULL;
  236. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  237. if(pNetInterface == NULL)
  238. {
  239. //写日志
  240. return COMMON_INVALID_HANDLE;
  241. }
  242. string stringTempReportId = stringReportId;
  243. int nRet = PHMS_SUCCESSFUL_RESULT;
  244. nRet = pNetInterface->UploadReport(stringTempReportId, stringCaseId, stringReceiverId, stringDiagnosis, stringDigitalSign, stringTimestampSign, stringCaseType, stringLocalReportPath, nResultFlag, stringFileType, pCallback);
  245. if(stringTempReportId.size() != 0)
  246. {
  247. strcpy(stringReportId, stringTempReportId.c_str());
  248. }
  249. return nRet;
  250. }
  251. int DoctorDownloadReport(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringUri, unsigned long nFileSize, pProgressAndSpeedCallback pCallback)
  252. {
  253. if(handle==NULL || stringLocalFilePath==NULL || stringUri==NULL)
  254. {
  255. return COMMON_PARAMETER_NULL;
  256. }
  257. string stringUuid = handle;
  258. CExternalNetInterface* pNetInterface = NULL;
  259. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  260. if(pNetInterface == NULL)
  261. {
  262. //写日志
  263. return COMMON_INVALID_HANDLE;
  264. }
  265. return pNetInterface->DoctorDownloadReport(stringLocalFilePath, stringUri, nFileSize, pCallback);
  266. }
  267. int UploadAdvice(NET_HANDLE handle, const char* stringUserId, const char* stringUsername, const char* stringMsg, const char* stringType, const char* stringIsSendMsg)
  268. {
  269. if(handle==NULL || stringUserId==NULL || stringUsername==NULL || stringMsg==NULL || stringType==NULL || stringIsSendMsg==NULL)
  270. {
  271. return COMMON_PARAMETER_NULL;
  272. }
  273. string stringUuid = handle;
  274. CExternalNetInterface* pNetInterface = NULL;
  275. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  276. if(pNetInterface == NULL)
  277. {
  278. //写日志
  279. return COMMON_INVALID_HANDLE;
  280. }
  281. return pNetInterface->UploadAdvice(stringUserId, stringUsername, stringMsg, stringType, stringIsSendMsg);
  282. }
  283. int DoctorChangeInfo(NET_HANDLE handle, const char* stringName, const char* stringSex, const char* stringTel, const char* stringBirthyead, const char* stringPosition, const char* stringNotes)
  284. {
  285. if(handle==NULL || stringName==NULL || stringSex==NULL || stringTel==NULL || stringBirthyead==NULL || stringPosition==NULL || stringNotes==NULL)
  286. {
  287. return COMMON_PARAMETER_NULL;
  288. }
  289. string stringUuid = handle;
  290. CExternalNetInterface* pNetInterface = NULL;
  291. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  292. if(pNetInterface == NULL)
  293. {
  294. //写日志
  295. return COMMON_INVALID_HANDLE;
  296. }
  297. return pNetInterface->DoctorChangeInfo(stringName, stringSex, stringTel, stringBirthyead, stringPosition, stringNotes);
  298. }
  299. int DoctorGetSelfInfo(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringSenderId)
  300. {
  301. if(handle==NULL || stringLocalFilePath==NULL|| stringSenderId==NULL)
  302. {
  303. return COMMON_PARAMETER_NULL;
  304. }
  305. string stringUuid = handle;
  306. CExternalNetInterface* pNetInterface = NULL;
  307. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  308. if(pNetInterface == NULL)
  309. {
  310. //写日志
  311. return COMMON_INVALID_HANDLE;
  312. }
  313. return pNetInterface->DoctorGetSelfInfo(stringLocalFilePath, stringSenderId);
  314. }
  315. int UploadPhoto(NET_HANDLE handle, const char* stringPhotoPath)
  316. {
  317. if(handle==NULL || stringPhotoPath==NULL)
  318. {
  319. return COMMON_PARAMETER_NULL;
  320. }
  321. string stringUuid = handle;
  322. CExternalNetInterface* pNetInterface = NULL;
  323. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  324. if(pNetInterface == NULL)
  325. {
  326. //写日志
  327. return COMMON_INVALID_HANDLE;
  328. }
  329. return pNetInterface->UploadPhoto(stringPhotoPath);
  330. }
  331. int GetReviewReportList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringReportStartDate, const char* stringReportEndDate,const char* stringReviewStartDate,
  332. const char* stringReviewEndDate, const char* stringReviewState, const char* stringCaseType, const char* stringPtName, const char* stringSenderId, const char* stringYzlb, const char* stringAId,
  333. const char* stringReviewerId, const char* stringReceiverId, const char* stringCaseId, unsigned int nPageTo, unsigned int nPageSize)
  334. {
  335. if(handle==NULL || stringLocalFilePath==NULL || stringReportStartDate==NULL || stringReportEndDate==NULL || stringReviewStartDate==NULL || stringReviewEndDate==NULL ||
  336. stringReviewState==NULL || stringCaseType==NULL || stringPtName==NULL || stringSenderId==NULL || stringYzlb==NULL || stringAId==NULL ||
  337. stringReviewerId==NULL || stringReviewerId==NULL || stringCaseId==NULL)
  338. {
  339. return COMMON_PARAMETER_NULL;
  340. }
  341. string stringUuid = handle;
  342. CExternalNetInterface* pNetInterface = NULL;
  343. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  344. if(pNetInterface == NULL)
  345. {
  346. //写日志
  347. return COMMON_INVALID_HANDLE;
  348. }
  349. return pNetInterface->GetReviewReportList(stringLocalFilePath, stringReportStartDate, stringReportEndDate, stringReviewStartDate, stringReviewEndDate, stringReviewState,
  350. stringCaseType, stringPtName, stringSenderId, stringYzlb, stringAId, stringReviewerId, stringReceiverId, stringCaseId, nPageTo, nPageSize);
  351. }
  352. int ReviewReport(NET_HANDLE handle, const char* stringReportKeyId, const char* stringReviewState, const char* stringPath, const char* stringDiagnostic,
  353. const char* stringDigitalSign, const char* stringTimeStampSign)
  354. {
  355. if(handle==NULL || stringReportKeyId==NULL || stringReviewState==NULL || stringPath == NULL || stringDiagnostic==NULL || stringDigitalSign==NULL || stringTimeStampSign==NULL)
  356. {
  357. return COMMON_PARAMETER_NULL;
  358. }
  359. string stringUuid = handle;
  360. CExternalNetInterface* pNetInterface = NULL;
  361. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  362. if(pNetInterface == NULL)
  363. {
  364. //写日志
  365. return COMMON_INVALID_HANDLE;
  366. }
  367. return pNetInterface->ReviewReport(stringReportKeyId, stringReviewState, stringPath, stringDiagnostic, stringDigitalSign, stringTimeStampSign);
  368. }
  369. int GetCardUserList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCardId, const char* stringSenderId, const char* stringPersonId, const char* stringTel,
  370. const char* stringName, const char* stringType, unsigned int nPageTo, unsigned int nPageSize)
  371. {
  372. if(handle==NULL || stringLocalFilePath==NULL || stringCardId==NULL|| stringPersonId==NULL || stringTel==NULL|| stringName==NULL || stringType==NULL)
  373. {
  374. return COMMON_PARAMETER_NULL;
  375. }
  376. string stringUuid = handle;
  377. CExternalNetInterface* pNetInterface = NULL;
  378. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  379. if(pNetInterface == NULL)
  380. {
  381. //写日志
  382. return COMMON_INVALID_HANDLE;
  383. }
  384. return pNetInterface->GetCardUserList(stringLocalFilePath, stringCardId, stringSenderId, stringPersonId, stringTel, stringName, stringType, nPageTo, nPageSize);
  385. }
  386. int MarkCaseException(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, int nResultFlag)
  387. {
  388. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL)
  389. {
  390. return COMMON_PARAMETER_NULL;
  391. }
  392. string stringUuid = handle;
  393. CExternalNetInterface* pNetInterface = NULL;
  394. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  395. if(pNetInterface == NULL)
  396. {
  397. //写日志
  398. return COMMON_INVALID_HANDLE;
  399. }
  400. return pNetInterface->MarkCaseException(stringCaseId, stringReceiverId, nResultFlag);
  401. }
  402. int GetAllTeamList(NET_HANDLE handle, const char* stringLocalFilePath)
  403. {
  404. if(handle==NULL || stringLocalFilePath==NULL)
  405. {
  406. return COMMON_PARAMETER_NULL;
  407. }
  408. string stringUuid = handle;
  409. CExternalNetInterface* pNetInterface = NULL;
  410. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  411. if(pNetInterface == NULL)
  412. {
  413. //写日志
  414. return COMMON_INVALID_HANDLE;
  415. }
  416. return pNetInterface->GetAllTeamList(stringLocalFilePath);
  417. }
  418. int GetDoctorListOfTeam(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringTeamId)
  419. {
  420. if(handle==NULL || stringLocalFilePath==NULL || stringTeamId==NULL)
  421. {
  422. return COMMON_PARAMETER_NULL;
  423. }
  424. string stringUuid = handle;
  425. CExternalNetInterface* pNetInterface = NULL;
  426. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  427. if(pNetInterface == NULL)
  428. {
  429. //写日志
  430. return COMMON_INVALID_HANDLE;
  431. }
  432. return pNetInterface->GetDoctorListOfTeam(stringLocalFilePath, stringTeamId);
  433. }
  434. int DoctorHandledCaseStatistics(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCaseType, const char* stringStartTime, const char* stringEndTime)
  435. {
  436. if(handle==NULL || stringLocalFilePath==NULL || stringCaseType==NULL || stringStartTime==NULL || stringEndTime==NULL)
  437. {
  438. return COMMON_PARAMETER_NULL;
  439. }
  440. string stringUuid = handle;
  441. CExternalNetInterface* pNetInterface = NULL;
  442. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  443. if(pNetInterface == NULL)
  444. {
  445. //写日志
  446. return COMMON_INVALID_HANDLE;
  447. }
  448. return pNetInterface->DoctorHandledCaseStatistics(stringLocalFilePath, stringCaseType, stringStartTime, stringEndTime);
  449. }
  450. int DoctorDownloadCaseAndOneReportOfOldCm(NET_HANDLE handle, const char* stringLocalCasePath, const char* stringLocalReportPath, const char* stringCaseId, const char* stringReportUri, unsigned long nReportSize, pProgressAndSpeedCallback pCallback)
  451. {
  452. if(handle==NULL || stringLocalCasePath==NULL || stringLocalReportPath==NULL || stringCaseId==NULL || stringReportUri==NULL)
  453. {
  454. return COMMON_PARAMETER_NULL;
  455. }
  456. string stringUuid = handle;
  457. CExternalNetInterface* pNetInterface = NULL;
  458. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  459. if(pNetInterface == NULL)
  460. {
  461. //写日志
  462. return COMMON_INVALID_HANDLE;
  463. }
  464. return pNetInterface->DoctorDownloadCaseAndOneReportOfOldCm(stringLocalCasePath, stringLocalReportPath, stringCaseId, stringReportUri, nReportSize, pCallback);
  465. }
  466. int GetTrendData(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringUId, const char* stringInterUId, const char* stringTrendType, const char* stringStartDate, const char* stringEndDate, const char* stringNextId)
  467. {
  468. if(handle==NULL || stringLocalFilePath==NULL || stringUId==NULL || stringInterUId==NULL || stringTrendType==NULL || stringStartDate==NULL || stringEndDate==NULL || stringNextId==NULL)
  469. {
  470. return COMMON_PARAMETER_NULL;
  471. }
  472. string stringUuid = handle;
  473. CExternalNetInterface* pNetInterface = NULL;
  474. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  475. if(pNetInterface == NULL)
  476. {
  477. //写日志
  478. return COMMON_INVALID_HANDLE;
  479. }
  480. return pNetInterface->GetTrendData(stringLocalFilePath, stringUId, stringInterUId, stringTrendType, stringStartDate, stringEndDate, stringNextId);
  481. }
  482. int GetHealthDegree(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringUId, const char* stringInterUId, const char* stringDate)
  483. {
  484. if(handle==NULL || stringLocalFilePath==NULL || stringUId==NULL || stringInterUId==NULL || stringDate==NULL)
  485. {
  486. return COMMON_PARAMETER_NULL;
  487. }
  488. string stringUuid = handle;
  489. CExternalNetInterface* pNetInterface = NULL;
  490. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  491. if(pNetInterface == NULL)
  492. {
  493. //写日志
  494. return COMMON_INVALID_HANDLE;
  495. }
  496. return pNetInterface->GetHealthDegree(stringLocalFilePath, stringUId, stringInterUId, stringDate);
  497. }
  498. int GetUserOfNoAdviceAndMostData(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringDays)
  499. {
  500. if(handle==NULL || stringLocalFilePath==NULL || stringDays==NULL)
  501. {
  502. return COMMON_PARAMETER_NULL;
  503. }
  504. string stringUuid = handle;
  505. CExternalNetInterface* pNetInterface = NULL;
  506. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  507. if(pNetInterface == NULL)
  508. {
  509. //写日志
  510. return COMMON_INVALID_HANDLE;
  511. }
  512. return pNetInterface->GetUserOfNoAdviceAndMostData(stringLocalFilePath, stringDays);
  513. }
  514. int AdviceDelay(NET_HANDLE handle, const char* stringUId, const char* stringMinutes)
  515. {
  516. if(handle==NULL || stringUId==NULL || stringMinutes==NULL)
  517. {
  518. return COMMON_PARAMETER_NULL;
  519. }
  520. string stringUuid = handle;
  521. CExternalNetInterface* pNetInterface = NULL;
  522. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  523. if(pNetInterface == NULL)
  524. {
  525. //写日志
  526. return COMMON_INVALID_HANDLE;
  527. }
  528. return pNetInterface->AdviceDelay(stringUId, stringMinutes);
  529. }
  530. int AdviceComplete(NET_HANDLE handle, const char* stringUId, const char* stringOptionType, const char* stringAdvice)
  531. {
  532. if(handle==NULL || stringUId==NULL || stringOptionType==NULL || stringAdvice)
  533. {
  534. return COMMON_PARAMETER_NULL;
  535. }
  536. string stringUuid = handle;
  537. CExternalNetInterface* pNetInterface = NULL;
  538. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  539. if(pNetInterface == NULL)
  540. {
  541. //写日志
  542. return COMMON_INVALID_HANDLE;
  543. }
  544. return pNetInterface->AdviceComplete(stringUId, stringOptionType, stringAdvice);
  545. }
  546. int GetUserListOfNoAdvice(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringDays, unsigned int nPageTo, unsigned int nPageSize)
  547. {
  548. if(handle==NULL || stringLocalFilePath==NULL || stringDays==NULL)
  549. {
  550. return COMMON_PARAMETER_NULL;
  551. }
  552. string stringUuid = handle;
  553. CExternalNetInterface* pNetInterface = NULL;
  554. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  555. if(pNetInterface == NULL)
  556. {
  557. //写日志
  558. return COMMON_INVALID_HANDLE;
  559. }
  560. return pNetInterface->GetUserListOfNoAdvice(stringLocalFilePath, stringDays, nPageTo, nPageSize);
  561. }
  562. int AdviceBegin(NET_HANDLE handle, const char* stringUId)
  563. {
  564. if(handle==NULL || stringUId==NULL)
  565. {
  566. return COMMON_PARAMETER_NULL;
  567. }
  568. string stringUuid = handle;
  569. CExternalNetInterface* pNetInterface = NULL;
  570. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  571. if(pNetInterface == NULL)
  572. {
  573. //写日志
  574. return COMMON_INVALID_HANDLE;
  575. }
  576. return pNetInterface->AdviceBegin(stringUId);
  577. }
  578. int GetUserListOfAdvicing(NET_HANDLE handle, const char* stringLocalFilePath, unsigned int nPageTo, unsigned int nPageSize)
  579. {
  580. if(handle==NULL || stringLocalFilePath==NULL)
  581. {
  582. return COMMON_PARAMETER_NULL;
  583. }
  584. string stringUuid = handle;
  585. CExternalNetInterface* pNetInterface = NULL;
  586. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  587. if(pNetInterface == NULL)
  588. {
  589. //写日志
  590. return COMMON_INVALID_HANDLE;
  591. }
  592. return pNetInterface->GetUserListOfAdvicing(stringLocalFilePath, nPageTo, nPageSize);
  593. }
  594. int GetAskList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringAskType, const char* stringAskEnd, const char* stringDoctorId, const char* stringIsAsk, const char* stringUserId, const char* stringStartTime, const char* stringEndTime, unsigned int nPageTo, unsigned int nPageSize)
  595. {
  596. if(handle==NULL || stringLocalFilePath==NULL || stringAskType==NULL || stringAskEnd==NULL || stringDoctorId==NULL || stringIsAsk==NULL || stringUserId==NULL || stringStartTime==NULL || stringEndTime==NULL)
  597. {
  598. return COMMON_PARAMETER_NULL;
  599. }
  600. string stringUuid = handle;
  601. CExternalNetInterface* pNetInterface = NULL;
  602. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  603. if(pNetInterface == NULL)
  604. {
  605. //写日志
  606. return COMMON_INVALID_HANDLE;
  607. }
  608. return pNetInterface->GetAskList(stringLocalFilePath, stringAskType, stringAskEnd, stringDoctorId, stringIsAsk, stringUserId, stringStartTime, stringEndTime, nPageTo, nPageSize);
  609. }
  610. int GetAskDetail(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringAskId)
  611. {
  612. if(handle==NULL || stringLocalFilePath==NULL || stringAskId==NULL)
  613. {
  614. return COMMON_PARAMETER_NULL;
  615. }
  616. string stringUuid = handle;
  617. CExternalNetInterface* pNetInterface = NULL;
  618. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  619. if(pNetInterface == NULL)
  620. {
  621. //写日志
  622. return COMMON_INVALID_HANDLE;
  623. }
  624. return pNetInterface->GetAskDetail(stringLocalFilePath, stringAskId);
  625. }
  626. int SubmitQuestion(NET_HANDLE handle, const char* stringUserId, const char* stringAdvise, const char* stringReportType, const char* stringAskId, const char* stringAskedId, const char* stringDoctorPhotoPath)
  627. {
  628. if(handle==NULL || stringUserId==NULL || stringAdvise==NULL || stringReportType==NULL || stringAskId==NULL || stringAskedId==NULL || stringDoctorPhotoPath==NULL)
  629. {
  630. return COMMON_PARAMETER_NULL;
  631. }
  632. string stringUuid = handle;
  633. CExternalNetInterface* pNetInterface = NULL;
  634. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  635. if(pNetInterface == NULL)
  636. {
  637. //写日志
  638. return COMMON_INVALID_HANDLE;
  639. }
  640. return pNetInterface->SubmitQuestion(stringUserId, stringAdvise, stringReportType, stringAskId, stringAskedId, stringDoctorPhotoPath);
  641. }
  642. int GetCliniqueListOfHospital(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringHospitalId)
  643. {
  644. if(handle==NULL || stringLocalFilePath==NULL || stringHospitalId==NULL)
  645. {
  646. return COMMON_PARAMETER_NULL;
  647. }
  648. string stringUuid = handle;
  649. CExternalNetInterface* pNetInterface = NULL;
  650. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  651. if(pNetInterface == NULL)
  652. {
  653. //写日志
  654. return COMMON_INVALID_HANDLE;
  655. }
  656. return pNetInterface->GetCliniqueListOfHospital(stringLocalFilePath, stringHospitalId);
  657. }
  658. int GetStatisticsInfo(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringTypeId, const char* stringMonth, const char* stringMonthDay, unsigned int nPageTo, unsigned int nPageSize)
  659. {
  660. if(handle==NULL || stringLocalFilePath==NULL || stringTypeId==NULL || stringMonth==NULL || stringMonthDay==NULL)
  661. {
  662. return COMMON_PARAMETER_NULL;
  663. }
  664. string stringUuid = handle;
  665. CExternalNetInterface* pNetInterface = NULL;
  666. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  667. if(pNetInterface == NULL)
  668. {
  669. //写日志
  670. return COMMON_INVALID_HANDLE;
  671. }
  672. return pNetInterface->GetStatisticsInfo(stringLocalFilePath, stringTypeId, stringMonth, stringMonthDay, nPageTo, nPageSize);
  673. }
  674. int NET_API GetUserHealthList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringNextId, const char* stringTypeId, const char* stringSecondTypeId, const char* stringName, const char* stringSex, const char* stringThirdIdType,
  675. const char* stringThirdId, const char* stringHospitalId, const char* stringUnitSenderId, const char* stringIsData, const char* stringIntervalTime, const char* stringPopulations, const char* stringContractDoctor, const char* stringIsContract, const char* stringPageSize)
  676. {
  677. if(handle==NULL || stringLocalFilePath==NULL || stringNextId==NULL || stringTypeId==NULL || stringSecondTypeId==NULL || stringName==NULL || stringSex==NULL || stringThirdIdType==NULL || stringThirdId==NULL || stringHospitalId==NULL
  678. || stringUnitSenderId==NULL || stringIsData==NULL || stringIntervalTime==NULL || stringPopulations==NULL || stringPageSize==NULL)
  679. {
  680. return COMMON_PARAMETER_NULL;
  681. }
  682. string stringUuid = handle;
  683. CExternalNetInterface* pNetInterface = NULL;
  684. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  685. if(pNetInterface == NULL)
  686. {
  687. //写日志
  688. return COMMON_INVALID_HANDLE;
  689. }
  690. return pNetInterface->GetUserHealthList(stringLocalFilePath, stringNextId, stringTypeId, stringSecondTypeId, stringName, stringSex, stringThirdIdType, stringThirdId, stringHospitalId, stringUnitSenderId, stringIsData, stringIntervalTime,
  691. stringPopulations, stringContractDoctor, stringIsContract, stringPageSize);
  692. }
  693. int GetAdviceImplemention(NET_HANDLE handle, char* stringPercent, const char* stringThirdId, const char* stringHospitalId)
  694. {
  695. if(handle==NULL || stringPercent==NULL || stringThirdId==NULL || stringHospitalId==NULL)
  696. {
  697. return COMMON_PARAMETER_NULL;
  698. }
  699. string stringUuid = handle;
  700. CExternalNetInterface* pNetInterface = NULL;
  701. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  702. if(pNetInterface == NULL)
  703. {
  704. //写日志
  705. return COMMON_INVALID_HANDLE;
  706. }
  707. string stringTempPercent;
  708. int nRet = PHMS_SUCCESSFUL_RESULT;
  709. nRet = pNetInterface->GetAdviceImplemention(stringTempPercent, stringThirdId, stringHospitalId);
  710. if(stringTempPercent.size() != 0)
  711. {
  712. strcpy(stringPercent, stringTempPercent.c_str());
  713. }
  714. return nRet;
  715. }
  716. int ChangePersonType(NET_HANDLE handle, const char* stringThirdId, const char* stringPeopleType, const char* stringHospitalId)
  717. {
  718. if(handle==NULL || stringPeopleType==NULL || stringThirdId==NULL || stringHospitalId==NULL)
  719. {
  720. return COMMON_PARAMETER_NULL;
  721. }
  722. string stringUuid = handle;
  723. CExternalNetInterface* pNetInterface = NULL;
  724. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  725. if(pNetInterface == NULL)
  726. {
  727. //写日志
  728. return COMMON_INVALID_HANDLE;
  729. }
  730. return pNetInterface->ChangePersonType(stringThirdId, stringPeopleType, stringHospitalId);
  731. }
  732. int SetNextVisitTime(NET_HANDLE handle, const char* stringThirdId, const char* stringInterViewTime, const char* stringHospitalId)
  733. {
  734. if(handle==NULL || stringInterViewTime==NULL || stringThirdId==NULL || stringHospitalId==NULL)
  735. {
  736. return COMMON_PARAMETER_NULL;
  737. }
  738. string stringUuid = handle;
  739. CExternalNetInterface* pNetInterface = NULL;
  740. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  741. if(pNetInterface == NULL)
  742. {
  743. //写日志
  744. return COMMON_INVALID_HANDLE;
  745. }
  746. return pNetInterface->SetNextVisitTime(stringThirdId, stringInterViewTime, stringHospitalId);
  747. }
  748. int GetPersonTypeList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringLanguage)
  749. {
  750. if(handle==NULL || stringLocalFilePath==NULL)
  751. {
  752. return COMMON_PARAMETER_NULL;
  753. }
  754. string stringUuid = handle;
  755. CExternalNetInterface* pNetInterface = NULL;
  756. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  757. if(pNetInterface == NULL)
  758. {
  759. //写日志
  760. return COMMON_INVALID_HANDLE;
  761. }
  762. return pNetInterface->GetPersonTypeList(stringLocalFilePath, stringLanguage);
  763. }
  764. int PublishHealthyKnowledge(NET_HANDLE handle, pHEALTHY_KNOWLEDGE pHealthKnowledge, unsigned int nArrayLen)
  765. {
  766. if(handle==NULL || pHealthKnowledge==NULL || nArrayLen==0)
  767. {
  768. return COMMON_PARAMETER_NULL;
  769. }
  770. string stringUuid = handle;
  771. CExternalNetInterface* pNetInterface = NULL;
  772. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  773. if(pNetInterface == NULL)
  774. {
  775. //写日志
  776. return COMMON_INVALID_HANDLE;
  777. }
  778. vector<HEALTHY_KNOWLEDGE> vHealthyKnowledge;
  779. for(int i=0; i<nArrayLen; i++)
  780. {
  781. vHealthyKnowledge.push_back(pHealthKnowledge[i]);
  782. }
  783. return pNetInterface->PublishHealthyKnowledge(vHealthyKnowledge);
  784. }
  785. int GetTrendRangeValue(NET_HANDLE handle, const char* stringLocalFilePath)
  786. {
  787. if(handle==NULL || stringLocalFilePath==NULL)
  788. {
  789. return COMMON_PARAMETER_NULL;
  790. }
  791. string stringUuid = handle;
  792. CExternalNetInterface* pNetInterface = NULL;
  793. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  794. if(pNetInterface == NULL)
  795. {
  796. //写日志
  797. return COMMON_INVALID_HANDLE;
  798. }
  799. return pNetInterface->GetTrendRangeValue(stringLocalFilePath);
  800. }
  801. int GetCliniqueReportList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCliniqueSenderId, const char* stringStartDate,
  802. const char* stringEndDate, const char* stringState, const char* stringName, const char* stringPatientSourceCode,
  803. const char* stringYzlb, const char* stringPIdType, const char* stringPId, const char* stringHb, const char* stringASectionId,
  804. const char* stringNextId, const char* stringPageSize)
  805. {
  806. if(handle==NULL || stringLocalFilePath==NULL || stringCliniqueSenderId==NULL || stringStartDate==NULL || stringEndDate==NULL || stringState==NULL ||
  807. stringName==NULL || stringPatientSourceCode==NULL || stringYzlb==NULL || stringPIdType==NULL || stringPId==NULL || stringHb==NULL || stringASectionId==NULL || stringNextId==NULL || stringPageSize==NULL)
  808. {
  809. return COMMON_PARAMETER_NULL;
  810. }
  811. string stringUuid = handle;
  812. CExternalNetInterface* pNetInterface = NULL;
  813. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  814. if(pNetInterface == NULL)
  815. {
  816. //写日志
  817. return COMMON_INVALID_HANDLE;
  818. }
  819. return pNetInterface->GetCliniqueReportList(stringLocalFilePath, stringCliniqueSenderId, stringStartDate, stringEndDate, stringState, stringName, stringPatientSourceCode, stringYzlb, stringPIdType, stringPId, stringHb, stringASectionId, stringNextId, stringPageSize);
  820. }
  821. int GetUserListBindingOrNot(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringNextId, const char* stringPageSize, const char* stringIsBind, const char* stringIsActive)
  822. {
  823. if(handle==NULL || stringLocalFilePath==NULL || stringNextId==NULL || stringPageSize==NULL || stringIsBind==NULL || stringIsActive==NULL)
  824. {
  825. return COMMON_PARAMETER_NULL;
  826. }
  827. string stringUuid = handle;
  828. CExternalNetInterface* pNetInterface = NULL;
  829. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  830. if(pNetInterface == NULL)
  831. {
  832. //写日志
  833. return COMMON_INVALID_HANDLE;
  834. }
  835. return pNetInterface->GetUserListBindingOrNot(stringLocalFilePath, stringNextId, stringPageSize, stringIsBind, stringIsActive);
  836. }
  837. int BindUser(NET_HANDLE handle, const char* stringUId, const char* stringUName)
  838. {
  839. if(handle==NULL || stringUId==NULL || stringUName==NULL)
  840. {
  841. return COMMON_PARAMETER_NULL;
  842. }
  843. string stringUuid = handle;
  844. CExternalNetInterface* pNetInterface = NULL;
  845. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  846. if(pNetInterface == NULL)
  847. {
  848. //写日志
  849. return COMMON_INVALID_HANDLE;
  850. }
  851. return pNetInterface->BindUser(stringUId, stringUName);
  852. }
  853. int UnbindUser(NET_HANDLE handle, const char* stringUId)
  854. {
  855. if(handle==NULL || stringUId==NULL)
  856. {
  857. return COMMON_PARAMETER_NULL;
  858. }
  859. string stringUuid = handle;
  860. CExternalNetInterface* pNetInterface = NULL;
  861. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  862. if(pNetInterface == NULL)
  863. {
  864. //写日志
  865. return COMMON_INVALID_HANDLE;
  866. }
  867. return pNetInterface->UnbindUser(stringUId);
  868. }
  869. int SearchCaseAdvanced(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringHospitalId, const char* stringDiagnostic,
  870. const char* stringName, const char* stringSex, QUERY_RANGE rangeAge, QUERY_RANGE rangeCreateTime, const char* stringMode,
  871. const char* stringCaseType, QUERY_ECG ecg, const char* stringFrom, const char* stringSize)
  872. {
  873. if(handle==NULL || stringLocalFilePath==NULL || stringHospitalId==NULL || stringDiagnostic==NULL || stringName==NULL || stringSex==NULL ||
  874. rangeAge.upperLimit==NULL || rangeAge.lowerLimit==NULL || rangeCreateTime.upperLimit==NULL || rangeCreateTime.lowerLimit==NULL || stringMode==NULL ||
  875. stringCaseType==NULL || stringFrom==NULL || stringSize==NULL)
  876. {
  877. return COMMON_PARAMETER_NULL;
  878. }
  879. string stringUuid = handle;
  880. CExternalNetInterface* pNetInterface = NULL;
  881. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  882. if(pNetInterface == NULL)
  883. {
  884. //写日志
  885. return COMMON_INVALID_HANDLE;
  886. }
  887. return pNetInterface->SearchCaseAdvanced(stringLocalFilePath, stringHospitalId, stringDiagnostic, stringName, stringSex, rangeAge, rangeCreateTime,
  888. stringMode, stringCaseType, ecg, stringFrom, stringSize);
  889. }
  890. int SearchCaseAdvancedString(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringHospitalId, const char* stringDiagnostic,
  891. const char* stringName, const char* stringSex, const char* stringJsonAge, const char* stringJsonCreateTime, const char* stringMode,
  892. const char* stringCaseType, const char* stringJsonEcg, const char* stringFrom, const char* stringSize)
  893. {
  894. if(handle==NULL || stringLocalFilePath==NULL || stringHospitalId==NULL || stringDiagnostic==NULL || stringName==NULL || stringSex==NULL ||
  895. stringJsonAge==NULL || stringJsonCreateTime==NULL || stringJsonEcg==NULL || stringMode==NULL ||
  896. stringCaseType==NULL || stringFrom==NULL || stringSize==NULL)
  897. {
  898. return COMMON_PARAMETER_NULL;
  899. }
  900. string stringUuid = handle;
  901. CExternalNetInterface* pNetInterface = NULL;
  902. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  903. if(pNetInterface == NULL)
  904. {
  905. //写日志
  906. return COMMON_INVALID_HANDLE;
  907. }
  908. return pNetInterface->SearchCaseAdvancedString(stringLocalFilePath, stringHospitalId, stringDiagnostic, stringName, stringSex, stringJsonAge, stringJsonCreateTime,
  909. stringMode, stringCaseType, stringJsonEcg, stringFrom, stringSize);
  910. }
  911. int SignDoctor(NET_HANDLE handle, const char* stringUId)
  912. {
  913. if(handle==NULL || stringUId==NULL)
  914. {
  915. return COMMON_PARAMETER_NULL;
  916. }
  917. string stringUuid = handle;
  918. CExternalNetInterface* pNetInterface = NULL;
  919. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  920. if(pNetInterface == NULL)
  921. {
  922. //写日志
  923. return COMMON_INVALID_HANDLE;
  924. }
  925. return pNetInterface->SignDoctor(stringUId);
  926. }
  927. int OnlyDownloadCase(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCaseId, const char* stringReceiverId, const char* stringUri, unsigned long nFileSize, pProgressAndSpeedCallback pCallback)
  928. {
  929. if(handle==NULL || stringLocalFilePath==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringUri==NULL)
  930. {
  931. return COMMON_PARAMETER_NULL;
  932. }
  933. string stringUuid = handle;
  934. CExternalNetInterface* pNetInterface = NULL;
  935. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  936. if(pNetInterface == NULL)
  937. {
  938. //写日志
  939. return COMMON_INVALID_HANDLE;
  940. }
  941. return pNetInterface->OnlyDownloadCase(stringLocalFilePath, stringCaseId, stringReceiverId, stringUri, nFileSize, pCallback);
  942. }
  943. int HoldPlaceAndAnalyzeBegin(NET_HANDLE handle, const char* stringCaseId, const char* stringHospitalId, const char* stringReceiverId, const char* stringCaseType)
  944. {
  945. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringHospitalId==NULL)
  946. {
  947. return COMMON_PARAMETER_NULL;
  948. }
  949. string stringUuid = handle;
  950. CExternalNetInterface* pNetInterface = NULL;
  951. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  952. if(pNetInterface == NULL)
  953. {
  954. //写日志
  955. return COMMON_INVALID_HANDLE;
  956. }
  957. return pNetInterface->HoldPlaceAndAnalyzeBegin(stringCaseId, stringHospitalId, stringReceiverId, stringCaseType);
  958. }
  959. int HoldPlaceReview(NET_HANDLE handle, const char* stringReportId)
  960. {
  961. if(handle==NULL || stringReportId==NULL)
  962. {
  963. return COMMON_PARAMETER_NULL;
  964. }
  965. string stringUuid = handle;
  966. CExternalNetInterface* pNetInterface = NULL;
  967. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  968. if(pNetInterface == NULL)
  969. {
  970. //写日志
  971. return COMMON_INVALID_HANDLE;
  972. }
  973. return pNetInterface->HoldPlaceReview(stringReportId);
  974. }
  975. int RollBackReview(NET_HANDLE handle, const char* stringReportId)
  976. {
  977. if(handle==NULL || stringReportId==NULL)
  978. {
  979. return COMMON_PARAMETER_NULL;
  980. }
  981. string stringUuid = handle;
  982. CExternalNetInterface* pNetInterface = NULL;
  983. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  984. if(pNetInterface == NULL)
  985. {
  986. //写日志
  987. return COMMON_INVALID_HANDLE;
  988. }
  989. return pNetInterface->RollBackReview(stringReportId);
  990. }
  991. int ResetReviewHoldPlace(NET_HANDLE handle, const char* stringReportId, const char* stringOccupantId, const char* stringOccupantName, const char* stringSuperKey)
  992. {
  993. if(handle==NULL || stringReportId==NULL || stringOccupantId==NULL || stringOccupantName==NULL || stringSuperKey==NULL)
  994. {
  995. return COMMON_PARAMETER_NULL;
  996. }
  997. string stringUuid = handle;
  998. CExternalNetInterface* pNetInterface = NULL;
  999. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  1000. if(pNetInterface == NULL)
  1001. {
  1002. //写日志
  1003. return COMMON_INVALID_HANDLE;
  1004. }
  1005. return pNetInterface->ResetReviewHoldPlace(stringReportId, stringOccupantId, stringOccupantName, stringSuperKey);
  1006. }
  1007. int ResetCaseHoldPlace(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, const char* stringOccupantId, const char* stringOccupantName, const char* stringSuperKey)
  1008. {
  1009. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringOccupantId==NULL || stringOccupantName==NULL || stringSuperKey==NULL)
  1010. {
  1011. return COMMON_PARAMETER_NULL;
  1012. }
  1013. string stringUuid = handle;
  1014. CExternalNetInterface* pNetInterface = NULL;
  1015. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  1016. if(pNetInterface == NULL)
  1017. {
  1018. //写日志
  1019. return COMMON_INVALID_HANDLE;
  1020. }
  1021. return pNetInterface->ResetCaseHoldPlace(stringCaseId, stringReceiverId, stringOccupantId, stringOccupantName, stringSuperKey);
  1022. }
  1023. int ReviewReportWithFile(NET_HANDLE handle, const char* stringCaseId, const char* stringReceiverId, const char* stringReportKeyId, const char* stringReviewState, const char* stringFileLocalPath, const char* stringDiagnostic,
  1024. const char* stringDigitalSign, const char* stringTimeStampSign, const char* stringResultFlag, const char* stringFileType, pProgressAndSpeedCallback pCallback)
  1025. {
  1026. if(handle==NULL || stringCaseId==NULL || stringReceiverId==NULL || stringReportKeyId==NULL || stringReviewState==NULL || stringFileLocalPath == NULL || stringDiagnostic==NULL ||
  1027. stringDigitalSign==NULL || stringTimeStampSign==NULL || stringResultFlag==NULL || stringFileType==NULL)
  1028. {
  1029. return COMMON_PARAMETER_NULL;
  1030. }
  1031. string stringUuid = handle;
  1032. CExternalNetInterface* pNetInterface = NULL;
  1033. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  1034. if(pNetInterface == NULL)
  1035. {
  1036. //写日志
  1037. return COMMON_INVALID_HANDLE;
  1038. }
  1039. return pNetInterface->ReviewReportWithFile(stringCaseId, stringReceiverId, stringReportKeyId, stringReviewState, stringFileLocalPath, stringDiagnostic, stringDigitalSign, stringTimeStampSign, stringResultFlag, stringFileType, pCallback);
  1040. }
  1041. int AddTag(NET_HANDLE handle, char* stringTagId, const char* stringTagName, const char* stringTagDescription)
  1042. {
  1043. if(handle==NULL || stringTagId==NULL || stringTagName==NULL || stringTagDescription==NULL)
  1044. {
  1045. return COMMON_PARAMETER_NULL;
  1046. }
  1047. string stringUuid = handle;
  1048. CExternalNetInterface* pNetInterface = NULL;
  1049. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  1050. if(pNetInterface == NULL)
  1051. {
  1052. //写日志
  1053. return COMMON_INVALID_HANDLE;
  1054. }
  1055. string stringTempTagId;
  1056. int nRet = PHMS_SUCCESSFUL_RESULT;
  1057. nRet = pNetInterface->AddTag(stringTempTagId, stringTagName, stringTagDescription);
  1058. if(stringTempTagId.size() != 0)
  1059. {
  1060. strcpy(stringTagId, stringTempTagId.c_str());
  1061. }
  1062. return nRet;
  1063. }
  1064. int GetTagList(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringSenderId)
  1065. {
  1066. if(handle==NULL || stringLocalFilePath==NULL || stringSenderId==NULL)
  1067. {
  1068. return COMMON_PARAMETER_NULL;
  1069. }
  1070. string stringUuid = handle;
  1071. CExternalNetInterface* pNetInterface = NULL;
  1072. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  1073. if(pNetInterface == NULL)
  1074. {
  1075. //写日志
  1076. return COMMON_INVALID_HANDLE;
  1077. }
  1078. return pNetInterface->GetTagList(stringLocalFilePath, stringSenderId);
  1079. }
  1080. int AddCaseToTag(NET_HANDLE handle, const char* stringTagId, const char* stringTagName, const char* stringCaseId, const char* stringCaseType, const char* stringCaseTypeName, const char* stringPatientName)
  1081. {
  1082. if(handle==NULL || stringTagId==NULL || stringTagName==NULL || stringCaseId==NULL || stringCaseType==NULL || stringCaseTypeName == NULL || stringPatientName==NULL)
  1083. {
  1084. return COMMON_PARAMETER_NULL;
  1085. }
  1086. string stringUuid = handle;
  1087. CExternalNetInterface* pNetInterface = NULL;
  1088. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  1089. if(pNetInterface == NULL)
  1090. {
  1091. //写日志
  1092. return COMMON_INVALID_HANDLE;
  1093. }
  1094. return pNetInterface->AddCaseToTag(stringTagId, stringTagName, stringCaseId, stringCaseType, stringCaseTypeName, stringPatientName);
  1095. }
  1096. int GetCaseListOfTag(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringTagId, const char* stringSenderId, const char* stringCaseType)
  1097. {
  1098. if(handle==NULL || stringLocalFilePath==NULL || stringTagId==NULL || stringSenderId==NULL)
  1099. {
  1100. return COMMON_PARAMETER_NULL;
  1101. }
  1102. string stringUuid = handle;
  1103. CExternalNetInterface* pNetInterface = NULL;
  1104. pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
  1105. if(pNetInterface == NULL)
  1106. {
  1107. //写日志
  1108. return COMMON_INVALID_HANDLE;
  1109. }
  1110. return pNetInterface->GetCaseListOfTag(stringLocalFilePath, stringTagId, stringSenderId, stringCaseType);
  1111. }