Execution prescription OK
This commit is contained in:
parent
4474f46d4a
commit
2a71c36d1d
2
App.js
2
App.js
|
@ -89,6 +89,7 @@ import ActivateBuySubscriptionScreen from "./screens/wallet/user/ActivateBuySubs
|
||||||
import SaisirFeuilleSoinScreen from "./screens/wallet/agent/SaisirFeuilleSoinScreen";
|
import SaisirFeuilleSoinScreen from "./screens/wallet/agent/SaisirFeuilleSoinScreen";
|
||||||
import ValidateConsultationScreen from "./screens/wallet/user/ValidateConsultationScreen";
|
import ValidateConsultationScreen from "./screens/wallet/user/ValidateConsultationScreen";
|
||||||
import ValidateConsultationDetailScreen from "./screens/wallet/user/ValidateConsultationDetailScreen";
|
import ValidateConsultationDetailScreen from "./screens/wallet/user/ValidateConsultationDetailScreen";
|
||||||
|
import ExecuterPrescriptionScreen from "./screens/wallet/agent/ExecuterPrescriptionScreen";
|
||||||
|
|
||||||
|
|
||||||
const instructions = Platform.select({
|
const instructions = Platform.select({
|
||||||
|
@ -256,6 +257,7 @@ const AppAgentStack = createDrawerNavigator({
|
||||||
historyItemDetails: HistoryItemDetails,
|
historyItemDetails: HistoryItemDetails,
|
||||||
creditrequest: HistoryRequester,
|
creditrequest: HistoryRequester,
|
||||||
saisirFeuilleSoinScreen: SaisirFeuilleSoinScreen,
|
saisirFeuilleSoinScreen: SaisirFeuilleSoinScreen,
|
||||||
|
executerPrescriptionScreen: ExecuterPrescriptionScreen,
|
||||||
addNetwork: AddNetwork,
|
addNetwork: AddNetwork,
|
||||||
updateinformation: UpdateInformations,
|
updateinformation: UpdateInformations,
|
||||||
notificationview: Notifications,
|
notificationview: Notifications,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -573,7 +573,7 @@
|
||||||
"MANAGE_HEALTH": "Gérer ses soins",
|
"MANAGE_HEALTH": "Gérer ses soins",
|
||||||
"DEMAND_AUTORIZATION_HEALTH": "Demande autorisation soin",
|
"DEMAND_AUTORIZATION_HEALTH": "Demande autorisation soin",
|
||||||
"HISTORIC_HEALTH": "Consulter historique de ses soins",
|
"HISTORIC_HEALTH": "Consulter historique de ses soins",
|
||||||
"VALID_HEALTH": "Valider une feuille de soin ",
|
"VALID_HEALTH": "Valider un soin ",
|
||||||
"ACTIVATE_INSSURANCE": "Activer son assurance",
|
"ACTIVATE_INSSURANCE": "Activer son assurance",
|
||||||
"AMOUNT_PER_DURATION": "Montant par durée",
|
"AMOUNT_PER_DURATION": "Montant par durée",
|
||||||
"AMOUNT_PRIME": "Montant de la prime",
|
"AMOUNT_PRIME": "Montant de la prime",
|
||||||
|
@ -671,5 +671,12 @@
|
||||||
"DEVICE": "Appareillage",
|
"DEVICE": "Appareillage",
|
||||||
"AJOUTER_NOUVEAU_MEDICAMENT": "Ajouter un nouveau médicament",
|
"AJOUTER_NOUVEAU_MEDICAMENT": "Ajouter un nouveau médicament",
|
||||||
"SOUS_ORDONNANCE": "Sous ordonnance ?",
|
"SOUS_ORDONNANCE": "Sous ordonnance ?",
|
||||||
"PLEASE_SELECT_CONDITON_PRISE_CHARGE_FIRST": "Veuillez d'abord sélectionner la conditon de prise en charge"
|
"PLEASE_SELECT_CONDITON_PRISE_CHARGE_FIRST": "Veuillez d'abord sélectionner la conditon de prise en charge",
|
||||||
|
"CONSULTATION": "Consultation",
|
||||||
|
"STATE": "Etat",
|
||||||
|
"INSTITUTE_NAME": "Nom de l'institut",
|
||||||
|
"ACCEPT": "Accepter",
|
||||||
|
"REJECT": "Rejeter",
|
||||||
|
"DETAIL": "Détail",
|
||||||
|
"NO_CONSULTATION_DEMAND": "Aucune demande de consultation"
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import InsuranceActions from './insurance.type';
|
||||||
import {
|
import {
|
||||||
consultationUrl,
|
consultationUrl,
|
||||||
createConsultationUrl,
|
createConsultationUrl,
|
||||||
|
executionPrescriptionUrl,
|
||||||
getAmountConsultationUrl,
|
getAmountConsultationUrl,
|
||||||
getDrugAndDevicesUrl,
|
getDrugAndDevicesUrl,
|
||||||
getInsuranceListUrl,
|
getInsuranceListUrl,
|
||||||
|
@ -484,9 +485,9 @@ export const fetchGetConsultationError = (error: any) => ({
|
||||||
payload: error,
|
payload: error,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchGetConsultation = (user_id) => {
|
export const fetchGetConsultation = (user_id, state = 'UNTREATED', typeParam = 'CONSULTATION') => {
|
||||||
return ApiAction({
|
return ApiAction({
|
||||||
url: `${consultationUrl}?user_id=${user_id}`,
|
url: `${consultationUrl}?user_id=${user_id}&state=${state}&type=${typeParam}`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
onLoading: fetchGetConsultationPending,
|
onLoading: fetchGetConsultationPending,
|
||||||
onSuccess: fetchGetConsultationSuccess,
|
onSuccess: fetchGetConsultationSuccess,
|
||||||
|
@ -523,3 +524,33 @@ export const fetchAcceptRejectConsultation = (data) => {
|
||||||
onError: fetchAcceptRejectConsultationError,
|
onError: fetchAcceptRejectConsultationError,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/************************************************************/
|
||||||
|
export const fetchExecutionPrescriptionPending = () => ({
|
||||||
|
type: InsuranceActions.EXECUTION_PRESCRIPTION_PENDING,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchExecutionPrescriptionReset = () => ({
|
||||||
|
type: InsuranceActions.EXECUTION_PRESCRIPTION_RESET,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchExecutionPrescriptionSuccess = (authkey: any) => ({
|
||||||
|
type: InsuranceActions.EXECUTION_PRESCRIPTION_SUCCESS,
|
||||||
|
payload: authkey,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchExecutionPrescriptionError = (error: any) => ({
|
||||||
|
type: InsuranceActions.EXECUTION_PRESCRIPTION_ERROR,
|
||||||
|
payload: error,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchExecutionPrescription = (data) => {
|
||||||
|
return ApiAction({
|
||||||
|
url: `${executionPrescriptionUrl}`,
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
onLoading: fetchExecutionPrescriptionPending,
|
||||||
|
onSuccess: fetchExecutionPrescriptionSuccess,
|
||||||
|
onError: fetchExecutionPrescriptionError,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -527,3 +527,33 @@ export const acceptOrRejectConsultationReducer = (state = INITIAL_STATE, action:
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const executionPrescriptionReducer = (state = INITIAL_STATE, action: InsuranceActions) => {
|
||||||
|
switch (action.type) {
|
||||||
|
case InsuranceActions.EXECUTION_PRESCRIPTION_PENDING:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
loading: true
|
||||||
|
}
|
||||||
|
case InsuranceActions.EXECUTION_PRESCRIPTION_SUCCESS:
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
result: action.payload,
|
||||||
|
error: null
|
||||||
|
}
|
||||||
|
case InsuranceActions.EXECUTION_PRESCRIPTION_ERROR:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
loading: false,
|
||||||
|
result: null,
|
||||||
|
error: action.payload
|
||||||
|
}
|
||||||
|
|
||||||
|
case InsuranceActions.EXECUTION_PRESCRIPTION_RESET:
|
||||||
|
return INITIAL_STATE;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return state
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -24,6 +24,7 @@ const selectCreateConsultationReducer = (state) => state.createConsultationReduc
|
||||||
const selectGetAmountConsultationReducer = (state) => state.getAmountConsultationReducer;
|
const selectGetAmountConsultationReducer = (state) => state.getAmountConsultationReducer;
|
||||||
const selectGetConsultationReducer = (state) => state.getConsultationReducer;
|
const selectGetConsultationReducer = (state) => state.getConsultationReducer;
|
||||||
const selectAcceptRefuseConsultationReducer = (state) => state.acceptOrRejectConsultationReducer;
|
const selectAcceptRefuseConsultationReducer = (state) => state.acceptOrRejectConsultationReducer;
|
||||||
|
const selectExecutionPrescriptionReducerReducer = (state) => state.executionPrescriptionReducer;
|
||||||
|
|
||||||
export const selectInsuranceList = createSelector(
|
export const selectInsuranceList = createSelector(
|
||||||
[selectInsuranceListReducer],
|
[selectInsuranceListReducer],
|
||||||
|
@ -100,3 +101,7 @@ export const selectAcceptRefuseConsultation = createSelector(
|
||||||
[selectAcceptRefuseConsultationReducer],
|
[selectAcceptRefuseConsultationReducer],
|
||||||
(acceptRejectConsultation) => acceptRejectConsultation
|
(acceptRejectConsultation) => acceptRejectConsultation
|
||||||
);
|
);
|
||||||
|
export const selectExecutionPrescription = createSelector(
|
||||||
|
[selectExecutionPrescriptionReducerReducer],
|
||||||
|
(executionPrescription) => executionPrescription
|
||||||
|
);
|
||||||
|
|
|
@ -90,5 +90,10 @@ const InsuranceActions = {
|
||||||
ACCEPT_REJECT_CONSULTATION_SUCCESS: 'ACCEPT_REJECT_CONSULTATION_SUCCESS',
|
ACCEPT_REJECT_CONSULTATION_SUCCESS: 'ACCEPT_REJECT_CONSULTATION_SUCCESS',
|
||||||
ACCEPT_REJECT_CONSULTATION_ERROR: 'ACCEPT_REJECT_CONSULTATION_ERROR',
|
ACCEPT_REJECT_CONSULTATION_ERROR: 'ACCEPT_REJECT_CONSULTATION_ERROR',
|
||||||
ACCEPT_REJECT_CONSULTATION_RESET: 'ACCEPT_REJECT_CONSULTATION_RESET',
|
ACCEPT_REJECT_CONSULTATION_RESET: 'ACCEPT_REJECT_CONSULTATION_RESET',
|
||||||
|
|
||||||
|
EXECUTION_PRESCRIPTION_PENDING: 'EXECUTION_PRESCRIPTION_PENDING',
|
||||||
|
EXECUTION_PRESCRIPTION_SUCCESS: 'EXECUTION_PRESCRIPTION_SUCCESS',
|
||||||
|
EXECUTION_PRESCRIPTION_ERROR: 'EXECUTION_PRESCRIPTION_ERROR',
|
||||||
|
EXECUTION_PRESCRIPTION_RESET: 'EXECUTION_PRESCRIPTION_RESET',
|
||||||
}
|
}
|
||||||
export default InsuranceActions;
|
export default InsuranceActions;
|
||||||
|
|
|
@ -55,7 +55,7 @@ import {
|
||||||
activatePaySubscriptionReducer,
|
activatePaySubscriptionReducer,
|
||||||
addBeneficiaryToSubscriptionReducer,
|
addBeneficiaryToSubscriptionReducer,
|
||||||
addDrugReducer,
|
addDrugReducer,
|
||||||
createConsultationReducer, getAmountConsultationReducer, getConsultationReducer,
|
createConsultationReducer, executionPrescriptionReducer, getAmountConsultationReducer, getConsultationReducer,
|
||||||
getDrugAppareilReducer,
|
getDrugAppareilReducer,
|
||||||
getInsurancePrimeAmountReducer,
|
getInsurancePrimeAmountReducer,
|
||||||
getNetworkActReducer,
|
getNetworkActReducer,
|
||||||
|
@ -169,7 +169,8 @@ const rootReducer = persistCombineReducers(persistConfig, {
|
||||||
createConsultationReducer: createConsultationReducer,
|
createConsultationReducer: createConsultationReducer,
|
||||||
getAmountConsultationReducer: getAmountConsultationReducer,
|
getAmountConsultationReducer: getAmountConsultationReducer,
|
||||||
getConsultationReducer: getConsultationReducer,
|
getConsultationReducer: getConsultationReducer,
|
||||||
acceptOrRejectConsultationReducer: acceptOrRejectConsultationReducer
|
acceptOrRejectConsultationReducer: acceptOrRejectConsultationReducer,
|
||||||
|
executionPrescriptionReducer: executionPrescriptionReducer
|
||||||
});
|
});
|
||||||
|
|
||||||
export default rootReducer;
|
export default rootReducer;
|
||||||
|
|
|
@ -68,5 +68,6 @@
|
||||||
"acceptPrestationAgent": "acceptPrestationAgent",
|
"acceptPrestationAgent": "acceptPrestationAgent",
|
||||||
"souscrireAssuranceUser": "souscrireAssuranceUser",
|
"souscrireAssuranceUser": "souscrireAssuranceUser",
|
||||||
"askPrestationUser": "askPrestationUser",
|
"askPrestationUser": "askPrestationUser",
|
||||||
"saisirFeuilleSoinScreen": "saisirFeuilleSoinScreen"
|
"saisirFeuilleSoinScreen": "saisirFeuilleSoinScreen",
|
||||||
|
"executerPrescriptionScreen": "executerPrescriptionScreen"
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,7 +272,8 @@ export default class OptionsMenu extends Component {
|
||||||
|| item === 'envoieCashVersCarteAgent' || item === 'modifyIdentificationUser' || item === 'createGroupNanoCredit' || item === 'groupNanoCredit' || item === 'demandeValidationGroupe'
|
|| item === 'envoieCashVersCarteAgent' || item === 'modifyIdentificationUser' || item === 'createGroupNanoCredit' || item === 'groupNanoCredit' || item === 'demandeValidationGroupe'
|
||||||
|| item === 'adhererGroupNanoCredit' || item === 'myNanoCreditGroup' || item === 'askNanoCredit' || item === 'refundNanoCreditUser' || item === 'cautionNanoCreditAgent'
|
|| item === 'adhererGroupNanoCredit' || item === 'myNanoCreditGroup' || item === 'askNanoCredit' || item === 'refundNanoCreditUser' || item === 'cautionNanoCreditAgent'
|
||||||
|| item === 'epargnerArgentUser' || item === 'askNanoCredit' || item === 'casserEpargneUser' || item === 'envoieWalletToBankAgent' || item === 'reattachAccountUser' || item === 'insuranceSubscriptionScreen'
|
|| item === 'epargnerArgentUser' || item === 'askNanoCredit' || item === 'casserEpargneUser' || item === 'envoieWalletToBankAgent' || item === 'reattachAccountUser' || item === 'insuranceSubscriptionScreen'
|
||||||
|| item === 'addBeneficiaryScreen' || item === 'activateBuySubscriptionScreen' || item === 'saisirFeuilleSoinScreen' || item === 'validateConsultationScreen' || item === 'validateConsultationDetailScreen') {
|
|| item === 'addBeneficiaryScreen' || item === 'activateBuySubscriptionScreen' || item === 'saisirFeuilleSoinScreen' || item === 'validateConsultationScreen' || item === 'validateConsultationDetailScreen'
|
||||||
|
|| item === 'executerPrescriptionScreen') {
|
||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
const color = this.state.currentId === item.id ? theme.accent : "grey"
|
const color = this.state.currentId === item.id ? theme.accent : "grey"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -67,7 +67,7 @@ const ValidateConsultationScreen = ({
|
||||||
readUser().then((user) => {
|
readUser().then((user) => {
|
||||||
setUser(user);
|
setUser(user);
|
||||||
console.log("User", user);
|
console.log("User", user);
|
||||||
fetchGetConsultation(user.id);
|
fetchGetConsultation(user.id, 'UNTREATED');
|
||||||
});
|
});
|
||||||
dispatch(fetchGetConsultationReset());
|
dispatch(fetchGetConsultationReset());
|
||||||
dispatch(fetchAcceptRejectConsultationReset());
|
dispatch(fetchAcceptRejectConsultationReset());
|
||||||
|
@ -101,6 +101,8 @@ const ValidateConsultationScreen = ({
|
||||||
],
|
],
|
||||||
{cancelable: false}
|
{cancelable: false}
|
||||||
);
|
);
|
||||||
|
if (user !== null)
|
||||||
|
fetchGetConsultation(user.id, 'UNTREATED');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (acceptRefuseConsultation.error) {
|
if (acceptRefuseConsultation.error) {
|
||||||
|
@ -111,6 +113,8 @@ const ValidateConsultationScreen = ({
|
||||||
);
|
);
|
||||||
dispatch(fetchAcceptRejectConsultationReset());
|
dispatch(fetchAcceptRejectConsultationReset());
|
||||||
setDisplayModalHistory(false);
|
setDisplayModalHistory(false);
|
||||||
|
if (user !== null)
|
||||||
|
fetchGetConsultation(user.id, 'UNTREATED');
|
||||||
}
|
}
|
||||||
}, [acceptRefuseConsultation]);
|
}, [acceptRefuseConsultation]);
|
||||||
|
|
||||||
|
@ -336,6 +340,11 @@ const ValidateConsultationScreen = ({
|
||||||
(
|
(
|
||||||
<FlatList
|
<FlatList
|
||||||
style={{flex: 1}}
|
style={{flex: 1}}
|
||||||
|
ListEmptyComponent={() => {
|
||||||
|
return (
|
||||||
|
<Text>{I18n.t('NO_CONSULTATION_DEMAND')}</Text>
|
||||||
|
)
|
||||||
|
}}
|
||||||
data={getConsultation.result.response}
|
data={getConsultation.result.response}
|
||||||
keyExtractor={(item, index) => item.id}
|
keyExtractor={(item, index) => item.id}
|
||||||
renderItem={({item, index}) => (
|
renderItem={({item, index}) => (
|
||||||
|
|
|
@ -621,9 +621,9 @@ export const optionNanoSanteAgentScreen = {
|
||||||
title: 'SAISIR_FEUILLE_SOIN',
|
title: 'SAISIR_FEUILLE_SOIN',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
screen: route.cautionNanoCreditAgent,
|
screen: route.executerPrescriptionScreen,
|
||||||
icon: 'edit',
|
icon: 'edit',
|
||||||
title: 'MODIFIER_FEUILLE_SOIN',
|
title: 'EXECUTER_PRESCRIPTION',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -608,6 +608,7 @@
|
||||||
"SELECT_SUBSCRIPTION": "Sélectionner une souscription",
|
"SELECT_SUBSCRIPTION": "Sélectionner une souscription",
|
||||||
"SAISIR_FEUILLE_SOIN": "Créer une consultation",
|
"SAISIR_FEUILLE_SOIN": "Créer une consultation",
|
||||||
"MODIFIER_FEUILLE_SOIN": "Modifier une feuille de soin",
|
"MODIFIER_FEUILLE_SOIN": "Modifier une feuille de soin",
|
||||||
|
"EXECUTER_PRESCRIPTION": "Exécuter prescription",
|
||||||
"FACTURER_FEUILLES_SOINS": "Facturer les feuilles de soins",
|
"FACTURER_FEUILLES_SOINS": "Facturer les feuilles de soins",
|
||||||
"FICHE_DE_SOIN": "Fiche de soins",
|
"FICHE_DE_SOIN": "Fiche de soins",
|
||||||
"PATIENT": "Patient",
|
"PATIENT": "Patient",
|
||||||
|
@ -678,4 +679,6 @@
|
||||||
"ACCEPT": "Accepter",
|
"ACCEPT": "Accepter",
|
||||||
"REJECT": "Rejeter",
|
"REJECT": "Rejeter",
|
||||||
"DETAIL": "Détail",
|
"DETAIL": "Détail",
|
||||||
|
"NO_CONSULTATION_DEMAND": "Aucune demande de consultation",
|
||||||
|
"LIST_CONSULTATION": "Liste des consultations"
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ export const subscribeInsuranceUrl = testBaseUrl + '/nanoSanteService/insurances
|
||||||
export const getProviderClassUrl = testBaseUrl + '/nanoSanteService/provider-classes';
|
export const getProviderClassUrl = testBaseUrl + '/nanoSanteService/provider-classes';
|
||||||
export const getNetworkActsUrl = testBaseUrl + '/nanoSanteService/acts';
|
export const getNetworkActsUrl = testBaseUrl + '/nanoSanteService/acts';
|
||||||
export const createConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/consultation';
|
export const createConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/consultation';
|
||||||
|
export const executionPrescriptionUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/execution';
|
||||||
export const consultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets';
|
export const consultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets';
|
||||||
export const getAmountConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/performances-amount';
|
export const getAmountConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/performances-amount';
|
||||||
export const getInsurancePrimeAmountUrl = testBaseUrl + '/nanoSanteService/insurances/subscriptions/bonus-amount';
|
export const getInsurancePrimeAmountUrl = testBaseUrl + '/nanoSanteService/insurances/subscriptions/bonus-amount';
|
||||||
|
|
Loading…
Reference in New Issue