Historique soins ok

This commit is contained in:
Brice Zele 2022-01-31 13:04:42 +01:00
parent f76fd07ab8
commit e47386f1c3
4 changed files with 72 additions and 30 deletions

File diff suppressed because one or more lines are too long

View File

@ -572,7 +572,7 @@
"MANAGE_ASSURANCE": "Gérer son assurance", "MANAGE_ASSURANCE": "Gérer son assurance",
"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 souscriptions et soins", "HISTORIC_HEALTH": "Historique souscriptions et soins",
"VALID_HEALTH": "Valider un 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",
@ -697,5 +697,8 @@
"MODIFY_EXECUTION": "Modifier une exécution", "MODIFY_EXECUTION": "Modifier une exécution",
"SOUSCRIPTION": "Souscriptions", "SOUSCRIPTION": "Souscriptions",
"FEUILLE_SOIN": "Feuille de soins", "FEUILLE_SOIN": "Feuille de soins",
"SOINS": "Soins" "SOINS": "Soins",
"NETWORK": "Réseau",
"TOTAL_BONUS_AMOUNT": "Total de la prime",
"BONUS_AMOUNT": "Montant de la prime de base"
} }

View File

@ -17,6 +17,7 @@ import {
TouchableOpacity, TouchableOpacity,
View, View,
} from 'react-native'; } from 'react-native';
import isNil from 'lodash/isNil';
import {connect, useDispatch} from 'react-redux'; import {connect, useDispatch} from 'react-redux';
import {Color} from "../../../config/Color"; import {Color} from "../../../config/Color";
import I18n from 'react-native-i18n'; import I18n from 'react-native-i18n';
@ -186,15 +187,6 @@ const HistoriqueNanoSanteUserScreen = ({
<ScrollView persistentScrollbar={true}> <ScrollView persistentScrollbar={true}>
<View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}> <View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('PATIENT')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{`${historyItemDetail.patient_lastname} ${historyItemDetail.patient_firstname}`}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
@ -206,6 +198,16 @@ const HistoriqueNanoSanteUserScreen = ({
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('ASSURE')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{`${user.firstname} ${user.lastname}`}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[styles.body2]}>Date</Text> <Text style={[styles.body2]}>Date</Text>
@ -222,13 +224,13 @@ const HistoriqueNanoSanteUserScreen = ({
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text <Text
style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.to}</Text> style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.bonus_amount}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('AMOUNT')}</Text> <Text style={[styles.body2]}>{I18n.t('TOTAL_BONUS_AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text <Text
@ -256,6 +258,18 @@ const HistoriqueNanoSanteUserScreen = ({
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('AYANT_DROIT')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
{historyItemDetail.beneficiaries.map(beneficiary => (
<Text
style={[Typography.caption1, Color.grayColor]}>{`${beneficiary.firstname} ${beneficiary.lastname}\n`}</Text>
))}
</View>
</View>
</View> </View>
</ScrollView> </ScrollView>
: :
@ -288,6 +302,28 @@ const HistoriqueNanoSanteUserScreen = ({
style={[Typography.caption1, Color.grayColor]}>{`${historyItemDetail.practitioner_lastname} ${historyItemDetail.practitioner_firstname}`}</Text> style={[Typography.caption1, Color.grayColor]}>{`${historyItemDetail.practitioner_lastname} ${historyItemDetail.practitioner_firstname}`}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('MONTANT_ASSURANCE')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.insurance_amount}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('MONTANT_ASSURE')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.insured_amount}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('CLASSE_PRESTATAIRE')}</Text> <Text style={[styles.body2]}>{I18n.t('CLASSE_PRESTATAIRE')}</Text>
@ -342,6 +378,17 @@ const HistoriqueNanoSanteUserScreen = ({
style={[Typography.caption1, Color.grayColor]}>{moment(historyItemDetail.created_at).format('YYYY-MM-DD')}</Text> style={[Typography.caption1, Color.grayColor]}>{moment(historyItemDetail.created_at).format('YYYY-MM-DD')}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('PRESTATION')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
{historyItemDetail.performances.map(performance => (
<Text
style={[Typography.caption1, Color.grayColor]}>{`${performance.act.name} \n ${performance.amount_formatted} ${!isNil(performance.home_visit_fees_formatted) ? '\n' + I18n.t('FRAIS_DEPLACEMENT')+': ' + performance.home_visit_fees_formatted : ''} \n${!isNil(performance.unit_price_formatted) ? 'P.U: ' + performance.unit_price_formatted + '\n P.T: ' +performance.total_price : ''}`}</Text>
))}
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('EXAMEN')}</Text> <Text style={[styles.body2]}>{I18n.t('EXAMEN')}</Text>
@ -349,7 +396,7 @@ const HistoriqueNanoSanteUserScreen = ({
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
{historyItemDetail.exams.map(exam => ( {historyItemDetail.exams.map(exam => (
<Text <Text
style={[Typography.caption1, Color.grayColor]}>{`${exam.description} \n ${exam.act.name} \n`}</Text> style={[Typography.caption1, Color.grayColor]}>{`${exam.quantity} ${exam.description} \n ${exam.act.name} \n ${!isNil(exam.unit_price_formatted) ? 'P.U: ' + exam.unit_price_formatted + '\n P.T: ' + exam.total_price : ''}`}</Text>
))} ))}
</View> </View>
</View> </View>
@ -360,18 +407,7 @@ const HistoriqueNanoSanteUserScreen = ({
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
{historyItemDetail.prescriptions.map(prescription => ( {historyItemDetail.prescriptions.map(prescription => (
<Text <Text
style={[Typography.caption1, Color.grayColor]}>{`${prescription.drug_or_device.name} \n ${prescription.dosage} \n`}</Text> style={[Typography.caption1, Color.grayColor]}>{`${prescription.quantity} ${prescription.drug_or_device.name} \n ${prescription.dosage} \n ${!isNil(prescription.unit_price_formatted) ? 'P.U: ' + prescription.unit_price_formatted + '\n P.T: ' + prescription.total_price : ''}`}</Text>
))}
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('PRESTATION')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
{historyItemDetail.performances.map(performance => (
<Text
style={[Typography.caption1, Color.grayColor]}>{`${performance.act.name} \n ${performance.amount} \n`}</Text>
))} ))}
</View> </View>
</View> </View>
@ -511,7 +547,7 @@ const HistoriqueNanoSanteUserScreen = ({
setPage(1); setPage(1);
setLoadMore(false); setLoadMore(false);
setHistoryResult([]); setHistoryResult([]);
fetchGetConsultation(user.id, 'UNTREATED', '', '&pagination=true&page=1'); fetchGetConsultation(user.id, 'ALL', '', '&pagination=true&page=1');
}}> }}>
{I18n.t('SOINS')} {I18n.t('SOINS')}

View File

@ -699,5 +699,8 @@
"FEUILLE_SOIN": "Feuille de soins", "FEUILLE_SOIN": "Feuille de soins",
"SOINS": "Soins", "SOINS": "Soins",
"NETWORK": "Réseau", "NETWORK": "Réseau",
"BONUS_AMOUNT": "Montant bonus" "TOTAL_BONUS_AMOUNT": "Total de la prime",
"BONUS_AMOUNT": "Montant de la prime de base",
"MONTANT_ASSURANCE": "Montant de l'assurance",
"MONTANT_ASSURE": "Montant de l'assuré"
} }