import { fireRequest , fireRequestForFiles } from "./fireRequest" ; export const postLogin = ( params ) => { return fireRequest ( "login" , [ ] , params ) ; } ; export const getCurrentUser = ( ) => { return fireRequest ( "currentUser" ) ; } ; export const signupUser = ( params ) => { return fireRequest ( "createUser" , [ ] , params ) ; } ; export const addUser = ( params ) => { return fireRequest ( "addUser" , [ ] , params ) ; } ; export const deleteUser = ( username ) => { return fireRequest ( "deleteUser" , [ username ] , { } ) ; } ; export const postResetPassword = ( form ) => { return fireRequest ( "resetPassword" , [ ] , form ) ; } ; export const postForgotPassword = ( form ) => { return fireRequest ( "forgotPassword" , [ ] , form ) ; } ; export const getUserPnconfig = ( pathParams ) => { return fireRequest ( "getUserPnconfig" , [ ] , { } , pathParams ) ; } ; export const updateUserPnconfig = ( params , pathParams ) => { return fireRequest ( "updateUserPnconfig" , [ ] , params , pathParams ) ; } ; export const createFacility = ( params ) => { return fireRequest ( "createFacility" , [ ] , params ) ; } ; export const updateFacility = ( id , params ) => { return fireRequest ( "updateFacility" , [ id ] , params ) ; } ; export const deleteFacility = ( id ) => { return fireRequest ( "deleteFacility" , [ id ] , { } ) ; } ; export const getUserList = ( params ) => { return fireRequest ( "userList" , [ ] , params ) ; } ; export const getUserListFacility = ( pathParam ) => { return fireRequest ( "userListFacility" , [ ] , { } , pathParam ) ; } ; export const addUserFacility = ( username , facility ) => { return fireRequest ( "addUserFacility" , [ ] , { facility } , { username } ) ; } ; export const deleteUserFacility = ( username , facility ) => { return fireRequest ( "deleteUserFacility" , [ ] , { data : { facility } } , { username } ) ; } ; export const getPermittedFacilities = ( params ) => { return fireRequest ( "getPermittedFacilities" , [ ] , params ) ; } ; export const getAllFacilities = ( params ) => { return fireRequest ( "getAllFacilities" , [ ] , params ) ; } ; export const getPermittedFacility = ( id , key ? ) => { return fireRequest ( "getPermittedFacility" , [ ] , { } , { id : id } , key ) ; } ; export const getAnyFacility = ( id , key ? ) => { return fireRequest ( "getAnyFacility" , [ ] , { } , { id : id } , key ) ; } ; export const getFacilityUsers = ( id ) => { return fireRequest ( "getFacilityUsers" , [ ] , { } , { facility_id : id } ) ; } ; export const getOnlineDoctors = ( ) => { return fireRequest ( "getOnlineDoctors" , [ ] , { } , { } ) ; } ; export const listFacilityAssetLocation = ( params , pathParam ) => fireRequest ( "listFacilityAssetLocation" , [ ] , params , pathParam ) ; export const createFacilityAssetLocation = ( params , facility_id ) => fireRequest ( "createFacilityAssetLocation" , [ ] , params , { facility_external_id : facility_id , } ) ; export const getFacilityAssetLocation = ( facility_external_id , external_id ) => fireRequest ( "getFacilityAssetLocation" , [ ] , { } , { facility_external_id , external_id } ) ; export const updateFacilityAssetLocation = ( params , facility_external_id , external_id ) => fireRequest ( "updateFacilityAssetLocation" , [ ] , params , { facility_external_id , external_id , } ) ; export const partialUpdateFacilityAssetLocation = ( params , facility_external_id , external_id ) => fireRequest ( "partialUpdateFacilityAssetLocation" , [ ] , params , { facility_external_id , external_id , } ) ; export const downloadFacility = ( ) => { return fireRequest ( "downloadFacility" ) ; } ; export const downloadFacilityCapacity = ( ) => { return fireRequest ( "downloadFacilityCapacity" ) ; } ; export const downloadFacilityDoctors = ( ) => { return fireRequest ( "downloadFacilityDoctors" ) ; } ; export const downloadFacilityTriage = ( ) => { return fireRequest ( "downloadFacilityTriage" ) ; } ; export const downloadPatients = ( ) => { return fireRequest ( "downloadPatients" ) ; } ; export const createCapacity = ( id , params , pathParam ) => { return id ? fireRequest ( "updateCapacity" , [ id ] , params , pathParam ) : fireRequest ( "createCapacity" , [ ] , params , pathParam ) ; } ; export const createDoctor = ( id , params , pathParam ) => { return id ? fireRequest ( "updateDoctor" , [ id ] , params , pathParam ) : fireRequest ( "createDoctor" , [ ] , params , pathParam ) ; } ; export const createTriageForm = ( params , pathParam ) => { return fireRequest ( "createTriage" , [ ] , params , pathParam ) ; } ; export const getTriageInfo = ( pathParam ) => { return fireRequest ( "getTriage" , [ ] , { } , pathParam ) ; } ; export const getTriageDetails = ( pathParam ) => { return fireRequest ( "getTriageDetails" , [ ] , { } , pathParam ) ; } ; export const listCapacity = ( params , pathParam ) => { return fireRequest ( "getCapacity" , [ ] , params , pathParam ) ; } ; export const listDoctor = ( params , pathParam ) => { return fireRequest ( "listDoctor" , [ ] , params , pathParam ) ; } ; export const getCapacity = ( id , pathParam ) => { return fireRequest ( "getCapacity" , [ id ] , { } , pathParam ) ; } ; export const getCapacityBed = ( pathParam ) => { return fireRequest ( "getCapacityBed" , [ ] , { } , pathParam ) ; } ; export const getDoctor = ( pathParam ) => { return fireRequest ( "getDoctor" , [ ] , { } , pathParam ) ; } ; export const searchPatient = ( params ) => { return fireRequest ( "searchPatient" , [ ] , params ) ; } ; export const searchUser = ( params ) => { return fireRequest ( "searchUser" , [ ] , params ) ; } ; export const getAllPatient = ( params , altKey ) => { return fireRequest ( "patientList" , [ ] , params , null , altKey ) ; } ; export const createPatient = ( params ) => { return fireRequest ( "addPatient" , [ ] , params ) ; } ; export const getPatient = ( pathParam ) => { return fireRequest ( "getPatient" , [ ] , { } , pathParam ) ; } ; export const updatePatient = ( params , pathParam ) => { return fireRequest ( "updatePatient" , [ ] , params , pathParam ) ; } ; export const patchPatient = ( params , pathParam ) => { return fireRequest ( "patchPatient" , [ ] , params , pathParam ) ; } ; export const transferPatient = ( params , pathParam ) => { return fireRequest ( "transferPatient" , [ ] , params , pathParam ) ; } ; export const getPatientNotes = ( patientId , limit , offset ) => { return fireRequest ( "getPatientNotes" , [ ] , { limit , offset } , { patientId } ) ; } ; export const addPatientNote = ( patientId , params ) => { return fireRequest ( "addPatientNote" , [ ] , params , { patientId } ) ; } ; export const getStates = ( ) => { return fireRequest ( "statesList" , [ ] ) ; } ; export const getStatesByText = ( params ) => { return fireRequest ( "statesList" , [ ] , params ) ; } ; export const getState = ( id ) => { return fireRequest ( "getState" , [ ] , { } , { id : id } ) ; } ; export const getDistrictByState = ( pathParam ) => { return fireRequest ( "getDistrictByState" , [ ] , { } , pathParam ) ; } ; export const getDistrictByName = ( params ) => { return fireRequest ( "getDistrictByName" , [ ] , params , null ) ; } ; export const getDistrict = ( id , key ? ) => { return fireRequest ( "getDistrict" , [ ] , { } , { id : id } , key ) ; } ; export const getLocalbodyByDistrict = ( pathParam ) => { return fireRequest ( "getLocalbodyByDistrict" , [ ] , { } , pathParam ) ; } ; export const getLocalbodyByName = ( params ) => { return fireRequest ( "getLocalbodyByName" , [ ] , params , null ) ; } ; export const getWardByLocalBody = ( pathParam ) => { return fireRequest ( "getWardByLocalBody" , [ ] , { } , pathParam ) ; } ; export const getWards = ( params ) => { return fireRequest ( "getWards" , [ ] , params ) ; } ; export const getAllLocalBodyByDistrict = ( pathParam ) => { return fireRequest ( "getAllLocalBodyByDistrict" , [ ] , { } , pathParam ) ; } ; export const getLocalBody = ( pathParam ) => { return fireRequest ( "getLocalBody" , [ ] , { } , pathParam ) ; } ; export const getAllLocalBody = ( params ) => { return fireRequest ( "getAllLocalBody" , [ ] , params ) ; } ; export const getSampleTestList = ( params , pathParam ) => { return fireRequest ( "sampleTestList" , [ ] , params , pathParam ) ; } ; export const sampleSearch = ( params ) => { return fireRequest ( "getTestSampleList" , [ ] , params ) ; } ; export const createSampleTest = ( params , pathParam ) => { return fireRequest ( "createSampleTest" , [ ] , params , pathParam ) ; } ; export const sampleReport = ( id , sampleId ) => { return fireRequest ( "sampleReport" , [ ] , { } , { id , sampleId } ) ; } ; export const getTestList = ( params ) => { return fireRequest ( "getTestSampleList" , [ ] , params ) ; } ; export const getTestSample = ( id ) => { return fireRequest ( "getTestSample" , [ id ] , { } ) ; } ; export const patchSample = ( params , pathParam ) => { return fireRequest ( "patchSample" , [ ] , params , pathParam ) ; } ; export const downloadSampleTests = ( params ) => { return fireRequest ( "getTestSampleList" , [ ] , { ... params , csv : 1 } ) ; } ; export const createDailyReport = ( params , pathParam ) => { return fireRequest ( "createDailyRounds" , [ ] , params , pathParam ) ; } ; export const updateDailyReport = ( params , pathParam ) => { return fireRequest ( "updateDailyReport" , [ ] , params , pathParam ) ; } ; export const getDailyReport = ( params , pathParam ) => { return fireRequest ( "getDailyReports" , [ ] , params , pathParam ) ; } ; export const getConsultationDailyRoundsDetails = ( pathParam ) => { return fireRequest ( "getDailyReport" , [ ] , { } , pathParam ) ; } ; export const dailyRoundsAnalyse = ( params , pathParam ) => { return fireRequest ( "dailyRoundsAnalyse" , [ ] , params , pathParam ) ; } ; export const createConsultation = ( params ) => { return fireRequest ( "createConsultation" , [ ] , params ) ; } ; export const getConsultationList = ( params ) => { return fireRequest ( "getConsultationList" , [ ] , params ) ; } ; export const getConsultation = ( id ) => { return fireRequest ( "getConsultation" , [ ] , { } , { id : id } ) ; } ; export const updateConsultation = ( id , params ) => { return fireRequest ( "updateConsultation" , [ id ] , params ) ; } ; export const getItems = ( params ) => { return fireRequest ( "getItems" , [ ] , params ) ; } ; export const postInventory = ( params , pathParams ) => { return fireRequest ( "createInventory" , [ ] , params , pathParams ) ; } ; export const getInventoryLog = ( params , pathParams ) => { return fireRequest ( "getInventoryLog" , [ params , "inventory" ] , pathParams ) ; } ; export const setMinQuantity = ( params , pathParams ) => { return fireRequest ( "setMinQuantity" , [ ] , params , pathParams ) ; } ; export const getMinQuantity = ( facilityId , params ) => { return fireRequest ( "getMinQuantity" , [ facilityId , "min_quantity" ] , params ) ; } ; export const updateMinQuantity = ( pathParams , params ) => { return fireRequest ( "updateMinQuantity" , [ ] , pathParams , params ) ; } ; export const getInventorySummary = ( facilityId , params ) => { return fireRequest ( "getInventorySummary" , [ facilityId , "inventorysummary" ] , params ) ; } ; export const getItemName = ( id ) => { return fireRequest ( "getItemName" , [ id ] , { } ) ; } ; export const flagInventoryItem = ( params ) => { return fireRequest ( "flagInventoryItem" , [ ] , { } , params ) ; } ; export const deleteLastInventoryLog = ( params ) => { return fireRequest ( "deleteLastInventoryLog" , [ ] , { } , params ) ; } ; export const discharge = ( params , pathParams ) => { return fireRequest ( "discharge" , [ ] , params , pathParams ) ; } ; export const dischargePatient = ( params , pathParams ) => { return fireRequest ( "dischargePatient" , [ ] , params , pathParams ) ; } ; export const getUserDetails = ( username ) => { return fireRequest ( "getUserDetails" , [ ] , { } , { username : username } ) ; } ; export const updateUserDetails = ( username , data ) => { return fireRequest ( "updateUserDetails" , [ username ] , data ) ; } ; export const createShift = ( params ) => { return fireRequest ( "createShift" , [ ] , params ) ; } ; export const updateShift = ( id , params ) => { return fireRequest ( "updateShift" , [ id ] , params ) ; } ; export const deleteShiftRecord = ( id ) => { return fireRequest ( "deleteShiftRecord" , [ id ] , { } ) ; } ; export const listShiftRequests = ( params , key ) => { return fireRequest ( `listShiftRequests` , [ ] , params , null , key ) ; } ; export const getShiftDetails = ( pathParam ) => { return fireRequest ( "getShiftDetails" , [ ] , { } , pathParam ) ; } ; export const completeTransfer = ( pathParams ) => { return fireRequest ( "completeTransfer" , [ ] , { } , pathParams ) ; } ; export const downloadShiftRequests = ( params ) => { return fireRequest ( "downloadShiftRequests" , [ ] , params ) ; } ; export const getShiftComments = ( id ) => { return fireRequest ( "getShiftComments" , [ ] , { } , { id } ) ; } ; export const addShiftComments = ( id , params ) => { return fireRequest ( "addShiftComments" , [ ] , params , { id } ) ; } ; export const externalResultList = ( params , altKey ) => { return fireRequest ( "externalResultList" , [ ] , params , null , altKey ) ; } ; export const externalResult = ( pathParam ) => { return fireRequest ( "externalResult" , [ ] , { } , pathParam ) ; } ; export const externalResultUploadCsv = ( params ) => { return fireRequest ( "externalResultUploadCsv" , [ ] , params ) ; } ; export const deleteExternalResult = ( id ) => { return fireRequest ( "deleteExternalResult" , [ id ] , { } ) ; } ; export const updateExternalResult = ( id , params ) => { return fireRequest ( "updateExternalResult" , [ ] , params , { id } ) ; } ; export const partialUpdateExternalResult = ( id , params ) => { return fireRequest ( "partialUpdateExternalResult" , [ ] , params , { id } ) ; } ; export const getNotifications = ( params ) => { return fireRequest ( "getNotifications" , [ ] , params ) ; } ; export const getNotificationData = ( pathParam ) => { return fireRequest ( "getNotificationData" , [ ] , { } , pathParam ) ; } ; export const getPublicKey = ( ) => { return fireRequest ( "getPublicKey" , [ ] , { } , { } ) ; } ; export const sendNotificationMessages = ( params ) => { return fireRequest ( "sendNotificationMessages" , [ ] , params , { } ) ; } ; export const createUpload = ( params ) => { return fireRequest ( "createUpload" , [ ] , params ) ; } ; export const viewUpload = ( params ) => { return fireRequest ( "viewUpload" , [ ] , params ) ; } ; export const retrieveUpload = ( params , fileId ) => { return fireRequest ( "retrieveUpload" , [ ] , params , { fileId : fileId } ) ; } ; export const retrieveUploadFilesURL = ( params , fileId ) => { return fireRequestForFiles ( "retrieveUpload" , [ ] , params , { fileId : fileId } ) ; } ; export const listInvestigations = ( params , altKey = "listInvestigations" ) => { return fireRequest ( "listInvestigations" , [ ] , params , null , altKey ) ; } ; export const listInvestigationGroups = ( params ) => { return fireRequest ( "listInvestigationGroups" , [ ] , params ) ; } ; export const createInvestigation = ( params , consultation_external_id ) => { return fireRequest ( "createInvestigation" , [ ] , params , { consultation_external_id : consultation_external_id , } ) ; } ; export const getInvestigationSessions = ( params , consultation_external_id ) => { return fireRequest ( "getInvestigationSessions" , [ ] , params , { consultation_external_id : consultation_external_id , } ) ; } ; export const getInvestigation = ( params , consultation_external_id ) => { return fireRequest ( "getInvestigation" , [ ] , params , { consultation_external_id : consultation_external_id , } ) ; } ; export const getPatientInvestigation = ( params , patient_external_id ) => { return fireRequest ( "getPatientInvestigation" , [ ] , params , { patient_external_id : patient_external_id , } ) ; } ; export const editInvestigation = ( params , consultation_external_id ) => { return fireRequest ( "editInvestigation" , [ ] , params , { consultation_external_id : consultation_external_id , } ) ; } ; export const createResource = ( params ) => { return fireRequest ( "createResource" , [ ] , params ) ; } ; export const updateResource = ( id , params ) => { return fireRequest ( "updateResource" , [ id ] , params ) ; } ; export const deleteResourceRecord = ( id ) => { return fireRequest ( "deleteResourceRecord" , [ id ] , { } ) ; } ; export const listResourceRequests = ( params , key ) => { return fireRequest ( `listResourceRequests` , [ ] , params , null , key ) ; } ; export const getResourceDetails = ( pathParam ) => { return fireRequest ( "getResourceDetails" , [ ] , { } , pathParam ) ; } ; export const downloadResourceRequests = ( params ) => { return fireRequest ( "downloadResourceRequests" , [ ] , params ) ; } ; export const getResourceComments = ( id , params ) => { return fireRequest ( "getResourceComments" , [ ] , params , { id } ) ; } ; export const addResourceComments = ( id , params ) => { return fireRequest ( "addResourceComments" , [ ] , params , { id } ) ; } ; export const listAssets = ( params ) => fireRequest ( "listAssets" , [ ] , params ) ; export const createAsset = ( params ) => fireRequest ( "createAsset" , [ ] , params ) ; export const getAssetUserLocation = ( params ) => fireRequest ( "getAssetUserLocation" , [ ] , params ) ; export const createAssetUserLocation = ( params ) => fireRequest ( "createAssetUserLocation" , [ ] , params ) ; export const getAsset = ( id ) => fireRequest ( "getAsset" , [ ] , { } , { external_id : id } ) ; export const updateAsset = ( id , params ) => fireRequest ( "updateAsset" , [ ] , params , { external_id : id } ) ; export const partialUpdateAsset = ( id ) => fireRequest ( "partialUpdateAsset" , [ ] , { } , { external_id : id } ) ; export const listAssetTransaction = ( params ) => fireRequest ( "listAssetTransaction" , [ ] , params ) ; export const getAssetTransaction = ( id ) => fireRequest ( "getAssetTransaction" , [ ] , { } , { id } ) ;