123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 |
- #define PHMS_DLL_EXPORTS
- #include "WithinHospitalNetInterface.h"
- #include "ExternalNetInterface.h"
- #include "ErrorCode.h"
- #include <map>
- #include <string>
- #include "NetThreadManager.h"
- using namespace std;
- int SetCliniqueBusy(NET_HANDLE handle, const char* stringCliniqueId)
- {
- if(handle==NULL || stringCliniqueId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->SetCliniqueBusy(stringCliniqueId);
- }
- int SetCliniqueFree(NET_HANDLE handle, const char* stringCliniqueId)
- {
- if(handle==NULL || stringCliniqueId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->SetCliniqueFree(stringCliniqueId);
- }
- int NET_API SetCliniqueChecking(NET_HANDLE handle, const char* stringCliniqueId)
- {
- if(handle==NULL || stringCliniqueId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->SetCliniqueChecking(stringCliniqueId);
- }
- int NET_API SetCliniqueShoutComplete(NET_HANDLE handle, const char* stringCliniqueId)
- {
- if(handle==NULL || stringCliniqueId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->SetCliniqueShoutComplete(stringCliniqueId);
- }
- int GetPatientInfoByAppNum(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringHospitalId, const char* stringOrderType, const char* stringOrderId,
- const char* stringReqDepart, const char* stringOrderState, const char* stringCheckType, const char* stringStartDate, const char* stringEndDate,const char* stringClinicId)
- {
- if(handle==NULL || stringLocalFilePath==NULL || stringHospitalId==NULL || stringOrderType==NULL || stringOrderId==NULL || stringReqDepart==NULL || stringOrderState==NULL ||
- stringCheckType==NULL || stringStartDate==NULL || stringEndDate==NULL || stringClinicId == NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->GetPatientInfoByAppNum(stringLocalFilePath, stringHospitalId, stringOrderType, stringOrderId, stringReqDepart, stringOrderState, stringCheckType, stringStartDate, stringEndDate,stringClinicId);
- }
- int GetPatientInfoByAppNumToHis(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringHospitalId, const char* stringOrderType, const char* stringOrderId)
- {
- if(handle==NULL || stringLocalFilePath==NULL || stringHospitalId==NULL || stringOrderType==NULL || stringOrderId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->GetPatientInfoByAppNumToHis(stringLocalFilePath, stringHospitalId, stringOrderType, stringOrderId);
- }
- int GetPatientInfoByAppNumToPhmsAndHis(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringHospitalId, const char* stringOrderType, const char* stringOrderId)
- {
- if(handle==NULL || stringLocalFilePath==NULL || stringHospitalId==NULL || stringOrderType==NULL || stringOrderId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->GetPatientInfoByAppNumToPhmsAndHis(stringLocalFilePath, stringHospitalId, stringOrderType, stringOrderId);
- }
- int ApplyCheck(NET_HANDLE handle, const char* stringCliniqueId, const char* stringOrderId, const char* stringOrderType)
- {
- if(handle==NULL || stringCliniqueId==NULL || stringOrderType==NULL || stringOrderId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->ApplyCheck(stringCliniqueId, stringOrderId, stringOrderType);
- }
- int GetWaitingCheck(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCliniqueId)
- {
- if(handle==NULL || stringLocalFilePath==NULL || stringCliniqueId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->GetWaitingCheck(stringLocalFilePath, stringCliniqueId);
- }
- int GetCliniqueState(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringCliniqueId)
- {
- if(handle==NULL || stringLocalFilePath==NULL || stringCliniqueId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->GetCliniqueState(stringLocalFilePath, stringCliniqueId);
- }
- int NotifyCaseState(NET_HANDLE handle, const char* stringHospitalId, const char* stringOrderType, const char* stringOrderId)
- {
- if(handle==NULL || stringHospitalId==NULL || stringOrderType==NULL || stringOrderId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->NotifyCaseState(stringHospitalId, stringOrderType, stringOrderId);
- }
- int NotifyReportState(NET_HANDLE handle, const char* stringReportId)
- {
- if(handle==NULL || stringReportId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->NotifyReportState(stringReportId);
- }
- int SetDoctorAgentId(NET_HANDLE handle, const char* stringDoctorAgentId)
- {
- if(handle==NULL || stringDoctorAgentId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->SetDoctorAgentId(stringDoctorAgentId);
- }
- int NotifyAppState(NET_HANDLE handle, const char* stringUnitId, const char* stringOrderId, const char* stringOrderType, const char* stringState)
- {
- if(handle==NULL || stringUnitId==NULL || stringOrderId==NULL || stringOrderType==NULL || stringState==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->NotifyAppState(stringUnitId, stringOrderId, stringOrderType, stringState);
- }
- int VerifyAppState(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringOrderId, const char* stringOrderType)
- {
- if(handle==NULL || stringLocalFilePath==NULL || stringOrderId==NULL || stringOrderType==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->VerifyAppState(stringLocalFilePath, stringOrderId, stringOrderType);
- }
- int GetHisReportState(NET_HANDLE handle, const char* stringLocalFilePath, const char* stringHospitalId, const char* stringOrderType, const char* stringOrderId)
- {
- if(handle==NULL || stringHospitalId==NULL || stringOrderType==NULL || stringOrderId==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->GetHisReportState(stringLocalFilePath, stringHospitalId, stringOrderType, stringOrderId);
- }
- int SetHisCriticalValue(NET_HANDLE handle, const char* stringHospitalId, const char* stringCaseId, const char* stringCriticalValues)
- {
- if(handle==NULL || stringHospitalId==NULL || stringCaseId==NULL || stringCriticalValues==NULL)
- {
- return COMMON_PARAMETER_NULL;
- }
- string stringUuid = handle;
- CExternalNetInterface* pNetInterface = NULL;
- pNetInterface = CNetThreadManager::GetNetThread(stringUuid);
- if(pNetInterface == NULL)
- {
- //写日志
- return COMMON_INVALID_HANDLE;
- }
- return pNetInterface->SetHisCriticalValue(stringHospitalId, stringCaseId, stringCriticalValues);
- }
|