@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2 -66
- package/index.js +1 -66
- package/package.json +1 -1
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- package/src/Common/Icons.js +0 -49
- package/src/Common/NetworkServiceCall.js +0 -265
- package/src/CommonStyle/CommonTheme.js +0 -11
- package/src/CommonStyle/ComponentFunctions.js +0 -632
- package/src/CommonStyle/PopupStyle.js +0 -146
- package/src/CommonStyle/commonStyle.js +0 -93
- package/src/CommonStyle/componentStyle.js +0 -545
- package/src/CommonStyle/optionListStyles.js +0 -175
- package/src/Components/ByProductPage.js +0 -200
- package/src/Components/CDropDownListNew.js +0 -153
- package/src/Components/CSupplierList.js +0 -88
- package/src/Components/CVerificationCard.js +0 -2822
- package/src/Components/CustomButton.js +0 -67
- package/src/Components/CustomCard.js +0 -127
- package/src/Components/CustomTextInput.js +0 -47
- package/src/Components/EquipmentPage.js +0 -313
- package/src/Components/FilterInput.Copy.js +0 -723
- package/src/Components/FilterInput.js +0 -569
- package/src/Components/HSubHeading.js +0 -68
- package/src/Components/HeaderCard.js +0 -40
- package/src/Components/MoreOptionsScreen.js +0 -251
- package/src/Components/NonSwipableProductCard.js +0 -226
- package/src/Components/NonSwipableSupplierCard.js +0 -348
- package/src/Components/ProductCard.js +0 -1336
- package/src/Components/QualityProductCard.js +0 -1059
- package/src/Components/RateProductCard.js +0 -1452
- package/src/Components/RawMaterial.js +0 -261
- package/src/Components/SDropDownEdited.js +0 -549
- package/src/Components/SDropDownNew.js +0 -529
- package/src/Components/SHelpDescription.js +0 -147
- package/src/Components/STextInputNew.js +0 -510
- package/src/Components/SearchProductCard.js +0 -470
- package/src/Components/StageByProduct.js +0 -199
- package/src/Components/SupplierCard.js +0 -243
- package/src/Components/SupplierInvoiceCard.js +0 -405
- package/src/Components/SwipableSupplierCard.js +0 -136
- package/src/Components/TagTemplate.js +0 -74
- package/src/Components/WrappedComponent.js +0 -25
- package/src/Custom/CBooking.js +0 -944
- package/src/Custom/CBookingPostpone.js +0 -1822
- package/src/Custom/CCalendar.js +0 -560
- package/src/Custom/CCard.js +0 -880
- package/src/Custom/CDetailCard.js +0 -205
- package/src/Custom/CHelpImage.js +0 -52
- package/src/Custom/CReport.js +0 -569
- package/src/Custom/CScrollView.js +0 -73
- package/src/Custom/CSignature.js +0 -112
- package/src/Custom/CSliderMenu.js +0 -339
- package/src/Custom/CSupplierCard.js +0 -99
- package/src/Custom/CTemplateCard.js +0 -438
- package/src/Custom/CTokenAllocation.js +0 -1402
- package/src/Custom/CTokenListOverlay.js +0 -122
- package/src/Custom/CWardStatus.js +0 -444
- package/src/Custom/Charts/CBarChart.js +0 -218
- package/src/Custom/Charts/CDashBoardList.js +0 -133
- package/src/Custom/Charts/CDashBoardTable.js +0 -172
- package/src/Custom/Charts/CLineChart.js +0 -193
- package/src/Custom/Charts/CPieChart.js +0 -186
- package/src/Custom/Loader.js +0 -182
- package/src/Custom/OUserView.js +0 -1121
- package/src/Custom/PreviewDosage.js +0 -115
- package/src/Custom/SearchLoader.js +0 -32
- package/src/Custom/TableComponent/CActivityTable.js +0 -707
- package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
- package/src/Custom/TableComponent/CTable.js +0 -185
- package/src/Custom/TableComponent/CTextBody.js +0 -40
- package/src/Custom/TableComponent/CTextHeader.js +0 -17
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
- package/src/Custom/TableComponent/SDropdownTable.js +0 -491
- package/src/Custom/TableComponent/TagTable.js +0 -1200
- package/src/CustomComponents/CAddColumn.js +0 -140
- package/src/CustomComponents/CAssessmentDelete.js +0 -307
- package/src/CustomComponents/CAwesomeButton.js +0 -83
- package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
- package/src/CustomComponents/CBackHandler.js +0 -273
- package/src/CustomComponents/CCalendar.js +0 -243
- package/src/CustomComponents/CCommentOverlay.js +0 -202
- package/src/CustomComponents/CComments.js +0 -162
- package/src/CustomComponents/CContainerView.js +0 -24
- package/src/CustomComponents/CCustomTextInput.js +0 -336
- package/src/CustomComponents/CDetailView.js +0 -40
- package/src/CustomComponents/CDropDownList.js +0 -153
- package/src/CustomComponents/CDropdownSelect.js +0 -555
- package/src/CustomComponents/CFooterView.js +0 -42
- package/src/CustomComponents/CImagePickerSave.js +0 -316
- package/src/CustomComponents/CModalOverlay.js +0 -91
- package/src/CustomComponents/CNetworkStatus.js +0 -327
- package/src/CustomComponents/CNotesInstructions.js +0 -1000
- package/src/CustomComponents/COverlay.js +0 -81
- package/src/CustomComponents/CRemarks.js +0 -176
- package/src/CustomComponents/CRowAdd.js +0 -143
- package/src/CustomComponents/CSummaryDropDown.js +0 -327
- package/src/CustomComponents/CText.js +0 -9
- package/src/CustomComponents/CVectorIcon.js +0 -34
- package/src/CustomComponents/HtmlContentViewer.js +0 -65
- package/src/CustomComponents/PdfContentViewer.js +0 -90
- package/src/CustomComponents/SDropDownDosage.js +0 -1087
- package/src/CustomComponents/SwipableProductCard.js +0 -246
- package/src/CustomComponents/SwipableProductImageCard.js +0 -254
- package/src/CustomComponents/WorkOrderDetails.js +0 -1216
- package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
- package/src/HOC/ConfirmOverlay.js +0 -192
- package/src/HOC/HHeading.js +0 -70
- package/src/HOC/HMoreButton.js +0 -88
- package/src/HOC/HNatureHeading.js +0 -402
- package/src/HOC/HOCIcons.js +0 -80
- package/src/HOC/HOverlayCentered.js +0 -140
- package/src/HOC/HShadowButton.js +0 -45
- package/src/HOC/HShadowCountButton.js +0 -82
- package/src/HOC/OptionOverlay.js +0 -48
- package/src/Json/Chart.json +0 -818
- package/src/Json/Consultation.json +0 -622
- package/src/Json/CreditBill.json +0 -490
- package/src/Json/Dropdown.json +0 -216
- package/src/Json/DropdownConsultation.json +0 -228
- package/src/Json/DynamicReports.json +0 -623
- package/src/Json/Footer.json +0 -79
- package/src/Media/AudioScreen.js +0 -342
- package/src/Media/BarcodeScan.js +0 -145
- package/src/Media/CAudioPlay.js +0 -228
- package/src/Media/CCaptureImageWithoutEdit.js +0 -330
- package/src/Media/CImageGallery.js +0 -289
- package/src/Media/CImageZoom.js +0 -82
- package/src/Media/CSingleImage.js +0 -391
- package/src/Media/CSketchCanvas.js +0 -76
- package/src/Media/CVideoPlay.js +0 -31
- package/src/Media/DocumentScreen.js +0 -362
- package/src/Media/DrawingScreen.js +0 -578
- package/src/Media/ImageScreen.js +0 -309
- package/src/Media/RecordAudio.js +0 -250
- package/src/Media/RecordVideo.js +0 -223
- package/src/Media/VideoScreen.js +0 -378
- package/src/Navigation/PageNavigation.js +0 -224
- package/src/Navigation/useFocusEffect.js +0 -2
- package/src/Navigation/useFocusEffect.native.js +0 -1
- package/src/Navigation/useFocusEffect.web.js +0 -1
- package/src/Navigation/useIsFocused.js +0 -1
- package/src/Navigation/useIsFocused.native.js +0 -1
- package/src/Navigation/useIsFocused.web.js +0 -1
- package/src/Navigation/useNavigation.js +0 -2
- package/src/Navigation/useNavigation.native.js +0 -1
- package/src/Navigation/useNavigation.web.js +0 -1
- package/src/Screens/CMedications.js +0 -528
- package/src/Screens/CWebViewGallery.js +0 -203
- package/src/Screens/ChartScan.js +0 -279
- package/src/Screens/ChartScreenNew.js +0 -1579
- package/src/Screens/Consultation.js +0 -1500
- package/src/Screens/Dashboard.js +0 -778
- package/src/Screens/FileExplorer.js +0 -288
- package/src/Screens/Footer.js +0 -340
- package/src/Screens/ForgotPassword.js +0 -288
- package/src/Screens/HeaderBlock.js +0 -353
- package/src/Screens/Login.js +0 -328
- package/src/Screens/Notification.js +0 -149
- package/src/Screens/OcrScreen.js +0 -20
- package/src/Screens/PdfPreview.js +0 -507
- package/src/Screens/RegistrationDetails.js +0 -467
- package/src/Screens/SearchScreen.js +0 -582
- package/src/Screens/Splash.js +0 -788
- package/src/Screens/SwipeLeftView.js +0 -1867
- package/src/StaticComponents/SAlphabet.js +0 -47
- package/src/StaticComponents/SCheckBox.js +0 -42
- package/src/StaticComponents/SDatePicker.js +0 -208
- package/src/StaticComponents/SDatePickerLabel.js +0 -253
- package/src/StaticComponents/SDatePickerNew.js +0 -258
- package/src/StaticComponents/SDateTimePickerNew.js +0 -381
- package/src/StaticComponents/SDropDownGenerate.js +0 -450
- package/src/StaticComponents/SDropDownHoc.js +0 -636
- package/src/StaticComponents/SDropDownIcon.js +0 -500
- package/src/StaticComponents/SMenuBox.js +0 -131
- package/src/StaticComponents/SOverlay.js +0 -177
- package/src/StaticComponents/SOverlayTextInput.js +0 -109
- package/src/StaticComponents/SSearch.js +0 -438
- package/src/StaticComponents/SSearchBar.js +0 -53
- package/src/StaticComponents/SSpeedDial.js +0 -303
- package/src/StaticComponents/STextInput.js +0 -289
- package/src/StaticComponents/STextInputProps.js +0 -36
- package/src/StaticComponents/STimePicker.js +0 -171
- package/src/StaticComponents/STimingDropDownNew.js +0 -1585
- package/src/StaticComponents/STimingSwitch.js +0 -34
- package/src/layout/CContainerView.js +0 -21
- package/src/layout/CDetailView.js +0 -81
- package/src/layout/HeaderBlock.js +0 -353
- package/src/layout/INVLoginLayout.js +0 -657
- package/src/layout/Loader.js +0 -176
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { Text, View, FlatList, TouchableOpacity, Dimensions, ActivityIndicator, ScrollView, Switch, TextInput, RefreshControl } from 'react-native';
|
|
3
|
-
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
|
4
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
6
|
-
import { ArrayCheck, getLoading, isBNUL, isNU, isNUQ, isNUQZ, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
7
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
8
|
-
import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
|
|
9
|
-
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
10
|
-
import CTextHeader from './TableComponent/CTextHeader';
|
|
11
|
-
import CTextBody from './TableComponent/CTextBody';
|
|
12
|
-
import HHeading from '../HOC/HHeading';
|
|
13
|
-
import STimePicker from '../StaticComponents/STimePicker';
|
|
14
|
-
import Loader from './Loader';
|
|
15
|
-
import moment from 'moment';
|
|
16
|
-
import SDropDownNew from '../Components/SDropDownNew';
|
|
17
|
-
|
|
18
|
-
import HOCIcons from '../HOC/HOCIcons';
|
|
19
|
-
import SDatePickerNew from '../StaticComponents/SDatePickerNew';
|
|
20
|
-
import { Menu, MenuOptions, MenuTrigger } from 'react-native-popup-menu';
|
|
21
|
-
import CCommentOverlay from '../CustomComponents/CCommentOverlay';
|
|
22
|
-
import {
|
|
23
|
-
MenuOption,
|
|
24
|
-
} from 'react-native-popup-menu';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export default function CTokenListOverlay(props) {
|
|
28
|
-
|
|
29
|
-
const [refresh, setRefresh] = useState(0);
|
|
30
|
-
const [dataarray, setDataArray] = useState([]);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
getTokenList2(props.footerData, props.postponedate, props.item);
|
|
36
|
-
}, []);
|
|
37
|
-
|
|
38
|
-
function getTokenList2(footerdata, pdate, item) {
|
|
39
|
-
|
|
40
|
-
setDataArray([]);
|
|
41
|
-
let buttonapi = APIURL + 'emr/emrcommonget/rnhopaptientbookingpostponedetails ' + props.consultant + ',' + JSON.stringify(footerdata.date) + ',' + '"' + pdate + '"' + ',' + item.bookingtypes + ',' + '1';
|
|
42
|
-
console.log('Ctokenlistoverlay', buttonapi);
|
|
43
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
44
|
-
.then(function (response) {
|
|
45
|
-
if (response.httpstatus == 200) {
|
|
46
|
-
if (isNU(response.data) && isBNUL(response.data.tokenArr)) {
|
|
47
|
-
setDataArray(response.data.tokenArr);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
notifyMessage('Day wise data not available.', 4);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<View>
|
|
59
|
-
{isBNUL(dataarray) ?
|
|
60
|
-
<FlatList
|
|
61
|
-
data={dataarray}
|
|
62
|
-
horizontal={true}
|
|
63
|
-
renderItem={(val) => {
|
|
64
|
-
return (
|
|
65
|
-
<MenuOption
|
|
66
|
-
onSelect={() => {
|
|
67
|
-
val.item.selected = true,
|
|
68
|
-
setRefresh(refresh + 1),
|
|
69
|
-
props.callback(val.item);
|
|
70
|
-
}}
|
|
71
|
-
style={{
|
|
72
|
-
margin : normalize(5),
|
|
73
|
-
elevation : 5,
|
|
74
|
-
flexDirection : 'row',
|
|
75
|
-
alignItems : 'center',
|
|
76
|
-
backgroundColor : 'white',
|
|
77
|
-
borderTopWidth : 0.5,
|
|
78
|
-
borderRightWidth : 0.5,
|
|
79
|
-
borderLeftWidth : 2,
|
|
80
|
-
borderBottomWidth : 2,
|
|
81
|
-
borderRadius : 5,
|
|
82
|
-
height : normalize(35),
|
|
83
|
-
borderColor : props.item.color,
|
|
84
|
-
}}>
|
|
85
|
-
<View style={{
|
|
86
|
-
backgroundColor: props.item.color,
|
|
87
|
-
borderRadius: 5,
|
|
88
|
-
padding: 5,
|
|
89
|
-
width: normalize(25),
|
|
90
|
-
height: normalize(20),
|
|
91
|
-
justifyContent: 'center',
|
|
92
|
-
alignItems: 'center',
|
|
93
|
-
margin: 5,
|
|
94
|
-
}}>
|
|
95
|
-
<Text style={{ color : 'white', fontSize: normalize(10), fontWeight: 'bold' }}>{val.item.tokenno}</Text>
|
|
96
|
-
</View>
|
|
97
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
98
|
-
<HOCIcons.FontAwesome5
|
|
99
|
-
name={'calendar-alt'}
|
|
100
|
-
size={normalize(8)}
|
|
101
|
-
color={props.item.color}
|
|
102
|
-
style={{
|
|
103
|
-
paddingHorizontal: normalize(3),
|
|
104
|
-
}}
|
|
105
|
-
/>
|
|
106
|
-
<Text style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }}>{isNU(val.item.postponedate) ? moment(val.item.postponedate).format('DD-MM-YYYY') : null}{' '}{isNU(val.item.postponeconsultationtime) ? val.item.postponeconsultationtime : null}</Text>
|
|
107
|
-
</View>
|
|
108
|
-
</MenuOption>
|
|
109
|
-
);
|
|
110
|
-
}}
|
|
111
|
-
/>
|
|
112
|
-
:
|
|
113
|
-
<View>
|
|
114
|
-
<Text style={{ fontSize: normalize(10), color : 'black' }}>Token not found</Text>
|
|
115
|
-
</View>
|
|
116
|
-
}
|
|
117
|
-
</View>
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { Text, View, TextInput, Dimensions, FlatList, StyleSheet, ScrollView, ActivityIndicator, TouchableOpacity } from 'react-native';
|
|
3
|
-
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
4
|
-
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
|
5
|
-
import CPiechart from '../Custom/Charts/CPieChart';
|
|
6
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
7
|
-
import { ArrayCheck, getLoading, isBNUL, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
8
|
-
import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
|
|
9
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
10
|
-
import CText from '../CustomComponents/CText';
|
|
11
|
-
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
12
|
-
import HHeading from '../HOC/HHeading';
|
|
13
|
-
import Loader from './Loader';
|
|
14
|
-
import CCard from './CCard';
|
|
15
|
-
import ABlink from '../Alerts/ABlink';
|
|
16
|
-
import SSearch from '../StaticComponents/SSearch';
|
|
17
|
-
|
|
18
|
-
const CWardStatus = (props) => {
|
|
19
|
-
|
|
20
|
-
const navigation = useNavigation();
|
|
21
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
22
|
-
const [refresh, setRefresh] = useState(0);
|
|
23
|
-
const [filter, setFilter] = useState('');
|
|
24
|
-
const [chip, setChip] = useState(ValueCheck(Global.userData.hosuconsultant) && Global.userData.hosuconsultant > 0 ? false : true);
|
|
25
|
-
const [searchData, setSearchData] = useState('');
|
|
26
|
-
const [data, setData] = useState();
|
|
27
|
-
const sumArray = [];
|
|
28
|
-
const occupiedArray = [];
|
|
29
|
-
const TotalBeds = [];
|
|
30
|
-
const isFocused = useIsFocused();
|
|
31
|
-
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (isFocused == true) {
|
|
34
|
-
Global.PatientDetails = null;
|
|
35
|
-
Global.ChartDataLeft = null;
|
|
36
|
-
Global.ChartDataAll = null;
|
|
37
|
-
Global.ChartDataLeft = null;
|
|
38
|
-
}
|
|
39
|
-
}, [isFocused]);
|
|
40
|
-
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
getBedStatus();
|
|
43
|
-
}, []);
|
|
44
|
-
|
|
45
|
-
function getBedStatus() {
|
|
46
|
-
//Total Bed Status..............
|
|
47
|
-
let buttonapi = APIURL + 'emr/emrcommonget/rnhopabed';
|
|
48
|
-
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', buttonapi);
|
|
49
|
-
setIsLoading(true);
|
|
50
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
51
|
-
.then(function (response) {
|
|
52
|
-
if (response.httpstatus == 200 && response.data != null && response.data != undefined) {
|
|
53
|
-
setIsLoading(false);
|
|
54
|
-
setData(ArrayCheck(response.data.patientinformation) ? response.data.patientinformation.map((item) => ({ ...item, 'expand': true })) : []);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
setIsLoading(false);
|
|
58
|
-
notifyMessage('Occupancy not available,Please try again later', 4);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
getLoading(v => setIsLoading(false));
|
|
63
|
-
}
|
|
64
|
-
var OccupiedData;
|
|
65
|
-
var DrNameFilter;
|
|
66
|
-
var HelperFun;
|
|
67
|
-
var arrayWith;
|
|
68
|
-
var piechartsearch;
|
|
69
|
-
|
|
70
|
-
if (data != undefined) {
|
|
71
|
-
DrNameFilter = data.map((element) => {
|
|
72
|
-
return {
|
|
73
|
-
...element,
|
|
74
|
-
beddetails: element.beddetails.filter((subElement) => {
|
|
75
|
-
return subElement.hosuconsultant == Global.userData.hosuconsultant;
|
|
76
|
-
}),
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
OccupiedData = data.map((element) => {
|
|
80
|
-
return {
|
|
81
|
-
...element,
|
|
82
|
-
beddetails: element.beddetails.filter((subElement) => {
|
|
83
|
-
return subElement.bedstatus == 1 || subElement.bedstatus == 0;
|
|
84
|
-
}),
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
arrayWith = DrNameFilter.filter(function (el) {
|
|
89
|
-
return el.beddetails.length > 0;
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
if (OccupiedData) {
|
|
93
|
-
OccupiedData.map((item, i) => {
|
|
94
|
-
TotalBeds.push(item.totalbeds);
|
|
95
|
-
occupiedArray.push(item.beddetails.length);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (DrNameFilter) {
|
|
100
|
-
DrNameFilter.map((item, i) => {
|
|
101
|
-
sumArray.push(item.beddetails.length);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
HelperFun = data.map((element) => {
|
|
106
|
-
return {
|
|
107
|
-
...element,
|
|
108
|
-
beddetails: filter == 'WARD' ? element.beddetails : element.beddetails.filter(function (item) {
|
|
109
|
-
var badge = ValueCheck(item[getFilter(filter)]) ? item[getFilter(filter)] : '';
|
|
110
|
-
const dataItem = ' ' + badge + ' ';
|
|
111
|
-
const textData = searchData.toUpperCase();
|
|
112
|
-
return dataItem.indexOf(textData) > -1;
|
|
113
|
-
}),
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
piechartsearch = HelperFun.filter(function (el) {
|
|
118
|
-
return el.beddetails.length > 0;
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
var xxx = data.map((element) => {
|
|
122
|
-
return {
|
|
123
|
-
...element,
|
|
124
|
-
beddetails: filter == 'WARD' ? element.beddetails : element.beddetails.filter(function (item) {
|
|
125
|
-
var patientname = ValueCheck(item.patientname) ? item.patientname : '';
|
|
126
|
-
var patientId = ValueCheck(item.patientno) ? item.patientno : '';
|
|
127
|
-
var badge = ValueCheck(item[getFilter(filter)]) ? item[getFilter(filter)] : '';
|
|
128
|
-
const dataItem = ' ' + badge + ' ' + patientname + ' ' + patientId;
|
|
129
|
-
const textData = searchData.toUpperCase();
|
|
130
|
-
return dataItem.indexOf(textData) > -1;
|
|
131
|
-
}),
|
|
132
|
-
};
|
|
133
|
-
}).filter(function (el) {
|
|
134
|
-
return el.beddetails.length > 0;
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function getFilter(key) {
|
|
139
|
-
switch (key) {
|
|
140
|
-
case 'badgenumber':
|
|
141
|
-
return 'bedno';
|
|
142
|
-
case 'consultantname':
|
|
143
|
-
return 'admitteddoctor';
|
|
144
|
-
default:
|
|
145
|
-
return key;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function filterData() {
|
|
150
|
-
if (chip == true) {
|
|
151
|
-
setSearchData((Global.userData.hosuconsultant).toString());
|
|
152
|
-
setChip(!chip);
|
|
153
|
-
} else {
|
|
154
|
-
setSearchData('');
|
|
155
|
-
setChip(!chip);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function getExpand(params) {
|
|
160
|
-
params.expand = !params.expand;
|
|
161
|
-
setRefresh(refresh + 1);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function renderItem({ item }) {
|
|
165
|
-
TotalBeds.push(item.totalbeds);
|
|
166
|
-
return (
|
|
167
|
-
<View>
|
|
168
|
-
<HHeading
|
|
169
|
-
styles={{
|
|
170
|
-
'iconname': 'bed',
|
|
171
|
-
'bgcolor': '#f2efef',
|
|
172
|
-
'iconsize': 14,
|
|
173
|
-
'iconcolor': Global.AppTheme.primary_color,
|
|
174
|
-
'displaytext': item.wardname,
|
|
175
|
-
'textsize': 13,
|
|
176
|
-
'textcolor': Global.AppTheme.primary_color,
|
|
177
|
-
}}
|
|
178
|
-
callBack={val => (val == undefined ? null : getExpand(item))}
|
|
179
|
-
/>
|
|
180
|
-
|
|
181
|
-
{ArrayCheck(item.beddetails) && item.expand ?
|
|
182
|
-
<View style={{}}>
|
|
183
|
-
<View style={{ marginLeft: 10, flex: 1 }}>
|
|
184
|
-
<CCard
|
|
185
|
-
disabled={true}
|
|
186
|
-
filter={filter == 'consultantname' ? 'admitteddoctor' : filter}
|
|
187
|
-
search={filter == 'WARD' ? '' : searchData}
|
|
188
|
-
noscroll={true}
|
|
189
|
-
navigation={navigation}
|
|
190
|
-
data={(item.beddetails.map((Pdata, i) => ({
|
|
191
|
-
'datalistid': i + 1,
|
|
192
|
-
'bordercolor': '#143A81',
|
|
193
|
-
'hopapatient': ValueCheck(Pdata.hopapatient) ? Pdata.hopapatient : 0,
|
|
194
|
-
'verified': false,
|
|
195
|
-
'homrpatientchartdetailstatus': 0,
|
|
196
|
-
'homrpatientchart': 0,
|
|
197
|
-
'profilecontent': [
|
|
198
|
-
{
|
|
199
|
-
'patientno': ValueCheck(Pdata.patientno) ? (Pdata.patientno).toString() : '',
|
|
200
|
-
'patientname': ValueCheck(Pdata.patientname) ? Pdata.patientname : '',
|
|
201
|
-
'heading3': '',
|
|
202
|
-
'patienttype': 'IP',
|
|
203
|
-
'gender': Pdata.gender == 'F' ? 'FEMALE' : 'MALE',
|
|
204
|
-
'age': ValueCheck(Pdata.age) ? Pdata.age : '',
|
|
205
|
-
'mobileno': ValueCheck(Pdata.mobileno) ? Pdata.mobileno : '',
|
|
206
|
-
'badgecolor': 'rgb(255,255,255)',
|
|
207
|
-
'badgenumber': ValueCheck(Pdata.bedno) ? Pdata.bedno : '',
|
|
208
|
-
'logo1': '',
|
|
209
|
-
'place': ValueCheck(Pdata.place) ? Pdata.place : '',
|
|
210
|
-
'clinicalunit': ValueCheck(Pdata.clinicalunit) ? Pdata.clinicalunit : '',
|
|
211
|
-
'admitteddoctor': ValueCheck(Pdata.admitteddoctor) ? Pdata.admitteddoctor : '',
|
|
212
|
-
},
|
|
213
|
-
],
|
|
214
|
-
'centercontent': [
|
|
215
|
-
{
|
|
216
|
-
'id': 1,
|
|
217
|
-
'displaytext': ValueCheck(Pdata.place) ? Pdata.place : '',
|
|
218
|
-
'iconname': 'home',
|
|
219
|
-
'iconcolor': '#000000',
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
'id': 3,
|
|
223
|
-
'displaytext': ValueCheck(Pdata.clinicalunit) ? Pdata.clinicalunit : '',
|
|
224
|
-
'iconname': 'hospital',
|
|
225
|
-
'iconcolor': '#000000',
|
|
226
|
-
},
|
|
227
|
-
],
|
|
228
|
-
'rightcontent': [
|
|
229
|
-
{
|
|
230
|
-
'contentid': 1,
|
|
231
|
-
'displaytext': 'Last Visited',
|
|
232
|
-
'value': ValueCheck(Pdata.lastvisited) ? Pdata.lastvisited : '',
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
'leftcontent': [
|
|
236
|
-
{
|
|
237
|
-
'contentid': 1,
|
|
238
|
-
'displaytext': 'Last Visited',
|
|
239
|
-
'value': '',
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
})))}
|
|
243
|
-
/>
|
|
244
|
-
</View>
|
|
245
|
-
</View> : null}
|
|
246
|
-
|
|
247
|
-
{item.totalbeds != undefined && item.vaccant != undefined && item.filled != undefined && chip ?
|
|
248
|
-
<View style={{ flexDirection: 'row' }}>
|
|
249
|
-
<CPiechart
|
|
250
|
-
data={[{ 'value': item.totalbeds },
|
|
251
|
-
{ 'value': item.totalbeds - (item.beddetails).length },
|
|
252
|
-
{ 'value': (item.beddetails).length },
|
|
253
|
-
{ 'value': item.display }]}
|
|
254
|
-
style={{ 'innerRadius': 30, 'outerRadius': 60, 'labelRadius': 80, 'height': 0.25 }} />
|
|
255
|
-
<View style={{ flex: 1, justifyContent: 'center' }}>
|
|
256
|
-
{['Total Beds', 'Vaccant Beds', 'Occupied Beds'].map((display, p) => {
|
|
257
|
-
return (
|
|
258
|
-
<View key={p} style={{ flexDirection: 'row', alignItems: 'center', paddingVertical: normalize(4) }}>
|
|
259
|
-
<View style={{ width: normalize(15), height: normalize(15), backgroundColor: getPieColor(p), borderRadius: 5, marginHorizontal: 10 }} />
|
|
260
|
-
<Text style={{ fontSize: normalize(12) }}>{ValueCheck(display) ? display.toUpperCase() : ''}</Text>
|
|
261
|
-
<CText style={{ fontSize: normalize(12), color: 'black', fontWeight: 'bold', color: 'white' }}>{ValueCheck(display) ? display.toUpperCase() : ''}</CText>
|
|
262
|
-
</View>);
|
|
263
|
-
})}
|
|
264
|
-
</View>
|
|
265
|
-
</View> : null}
|
|
266
|
-
</View>
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function getPieColor(params) {
|
|
271
|
-
switch (params) {
|
|
272
|
-
case 0: return 'blue';
|
|
273
|
-
case 2: return '#cf0404';
|
|
274
|
-
case 1: return 'green';
|
|
275
|
-
default: return 'black';
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function fnData() {
|
|
280
|
-
|
|
281
|
-
if (chip) {
|
|
282
|
-
if (chip && filter == 'WARD') {
|
|
283
|
-
return data.filter(function (item) {
|
|
284
|
-
var wardname = ValueCheck(item.wardname) ? item.wardname : '';
|
|
285
|
-
const dataItem = wardname;
|
|
286
|
-
const textData = searchData.toUpperCase();
|
|
287
|
-
return dataItem.indexOf(textData) > -1;
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
return xxx;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
return arrayWith;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
return (
|
|
301
|
-
<View style={{ flex: 1, marginTop: normalize(-2) }}>
|
|
302
|
-
|
|
303
|
-
<HHeading
|
|
304
|
-
styles={{
|
|
305
|
-
'iconname': 'bed',
|
|
306
|
-
'bgcolor': '#f2efef',
|
|
307
|
-
'iconsize': 16,
|
|
308
|
-
'iconcolor': Global.AppTheme.primary_color,
|
|
309
|
-
'displaytext': 'Occupancy',
|
|
310
|
-
'textsize': 15,
|
|
311
|
-
'textcolor': Global.AppTheme.primary_color,
|
|
312
|
-
}}
|
|
313
|
-
callBack={val => (val == undefined ? null : console.log(val))} />
|
|
314
|
-
|
|
315
|
-
{isLoading ? <Loader displaytext={true} /> : null}
|
|
316
|
-
|
|
317
|
-
<View style={{ marginTop: 5, justifyContent: 'space-evenly', paddingHorizontal: normalize(5), flexDirection: 'row-reverse', alignItems: 'center' }}>
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
<TouchableOpacity
|
|
321
|
-
onPress={() => filterData()}
|
|
322
|
-
style={{ alignItems: 'center' }}>
|
|
323
|
-
<Text style={{ fontSize: normalize(10), fontWeight: 'bold', color: 'black' }}>{'ALL'}</Text>
|
|
324
|
-
<View style={{
|
|
325
|
-
width: normalize(50), height: normalize(45), alignItems: 'center', borderColor: 'black',
|
|
326
|
-
borderRadius: normalize(45) / 2, justifyContent: 'center', borderWidth: 3, backgroundColor: chip ? '#eae5e5' : '#fff',
|
|
327
|
-
}}>
|
|
328
|
-
<View style={{ alignItems: 'center' }}>
|
|
329
|
-
<ABlink>
|
|
330
|
-
<Icons.FontAwesome5 name="hand-point-down" color={Global.AppTheme.primary_color} size={normalize(13)} />
|
|
331
|
-
</ABlink>
|
|
332
|
-
<Text style={{ fontWeight: '700', color: 'black', fontSize: normalize(15) }}>{TotalBeds.reduce((partial_sum, a) => partial_sum + a, 0)}</Text>
|
|
333
|
-
</View>
|
|
334
|
-
</View>
|
|
335
|
-
</TouchableOpacity>
|
|
336
|
-
|
|
337
|
-
{/* {chip ? */}
|
|
338
|
-
<View style={{ alignItems: 'center' }}>
|
|
339
|
-
<Text style={{ fontSize: normalize(10), fontWeight: 'bold', color: 'black' }}>{'VACCANT'}</Text>
|
|
340
|
-
<View style={{
|
|
341
|
-
width: normalize(50), height: normalize(45), alignItems: 'center', borderColor: 'green',
|
|
342
|
-
borderRadius: normalize(45) / 2, justifyContent: 'center', borderWidth: 3,
|
|
343
|
-
}}>
|
|
344
|
-
<Icons.FontAwesome5 name="bed" color={Global.AppTheme.primary_color} size={normalize(13)} />
|
|
345
|
-
<Text style={{ fontWeight: '700' }}>{(TotalBeds.reduce((partial_sum, a) => partial_sum + a, 0)) -
|
|
346
|
-
(occupiedArray.reduce((partial_sum, a) => partial_sum + a, 0))}</Text>
|
|
347
|
-
</View>
|
|
348
|
-
</View>
|
|
349
|
-
{/* : null} */}
|
|
350
|
-
|
|
351
|
-
{!chip ?
|
|
352
|
-
<View style={{ alignItems: 'center' }}>
|
|
353
|
-
<Text style={{ fontSize: normalize(10), fontWeight: 'bold', color: 'black' }}>{chip ? 'TOTAL BEDS' : 'IP ' + '[' + Global.userData.username + ']'}</Text>
|
|
354
|
-
<View style={{
|
|
355
|
-
width: normalize(50), height: normalize(45), alignItems: 'center', borderColor: chip ? 'blue' : Global.AppTheme.primary_color,
|
|
356
|
-
borderRadius: normalize(45) / 2, justifyContent: 'center', borderWidth: 3, backgroundColor: chip ? '#fff' : '#eae5e5',
|
|
357
|
-
}}>
|
|
358
|
-
<Icons.FontAwesome5 name="bed" color={Global.AppTheme.primary_color} size={normalize(13)} />
|
|
359
|
-
<Text style={{ fontWeight: '700', color: chip ? 'black' : Global.AppTheme.primary_color, fontSize: normalize(15) }}>{chip ? TotalBeds.reduce((partial_sum, a) => partial_sum + a, 0) : sumArray.reduce((partial_sum, a) => partial_sum + a, 0)}</Text>
|
|
360
|
-
</View>
|
|
361
|
-
</View> : null}
|
|
362
|
-
|
|
363
|
-
{chip ?
|
|
364
|
-
<View style={{ alignItems: 'center' }}>
|
|
365
|
-
<Text style={{ fontSize: normalize(10), fontWeight: 'bold', color: 'black' }}>{'OCCUPIED'}</Text>
|
|
366
|
-
<View style={{
|
|
367
|
-
width: normalize(50), height: normalize(45), alignItems: 'center', borderColor: '#cf0404',
|
|
368
|
-
borderRadius: normalize(45) / 2, justifyContent: 'center', borderWidth: 3,
|
|
369
|
-
}}>
|
|
370
|
-
<Icons.FontAwesome5 name="bed" color={Global.AppTheme.primary_color} size={normalize(13)} />
|
|
371
|
-
<Text style={{ fontWeight: '700' }}>{occupiedArray.reduce((partial_sum, a) => partial_sum + a, 0)}</Text>
|
|
372
|
-
</View>
|
|
373
|
-
</View> : null}
|
|
374
|
-
</View>
|
|
375
|
-
|
|
376
|
-
<SSearch
|
|
377
|
-
editable={true}
|
|
378
|
-
dropdownapi={'emr/emrcommonget/rnlasearchdropdown 2'}
|
|
379
|
-
value={searchData}
|
|
380
|
-
dropdownarray={[
|
|
381
|
-
{
|
|
382
|
-
'datavalue': 2,
|
|
383
|
-
'iconname': 'hospital-o',
|
|
384
|
-
'displayvalue': 'WARD',
|
|
385
|
-
'searchparam': 'WARD',
|
|
386
|
-
'selected': false,
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
'datavalue': 9,
|
|
390
|
-
'iconname': 'user-md',
|
|
391
|
-
'displayvalue': 'DOCTOR',
|
|
392
|
-
'searchparam': 'admitteddoctor',
|
|
393
|
-
'selected': false,
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
'datavalue': 1,
|
|
397
|
-
'iconname': 'bed',
|
|
398
|
-
'displayvalue': 'BED NO.',
|
|
399
|
-
'searchparam': 'badgenumber',
|
|
400
|
-
'selected': false,
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
'datavalue': 3,
|
|
404
|
-
'iconname': 'location-arrow',
|
|
405
|
-
'displayvalue': 'PLACE',
|
|
406
|
-
'searchparam': 'place',
|
|
407
|
-
'selected': false,
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
'datavalue': 4,
|
|
411
|
-
'iconname': 'mobile',
|
|
412
|
-
'displayvalue': 'MOBILE NO.',
|
|
413
|
-
'searchparam': 'mobileno',
|
|
414
|
-
'selected': false,
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
'datavalue': 5,
|
|
418
|
-
'iconname': 'th-list',
|
|
419
|
-
'displayvalue': 'CLINIC',
|
|
420
|
-
'searchparam': 'clinicalunit',
|
|
421
|
-
'selected': false,
|
|
422
|
-
}]}
|
|
423
|
-
onChangeText={text => (
|
|
424
|
-
console.log('onChangeText.......'),
|
|
425
|
-
setSearchData(text)
|
|
426
|
-
)}
|
|
427
|
-
onChangeData={val => val == undefined ? null : (
|
|
428
|
-
console.log('onChangeData............', val.searchparam),
|
|
429
|
-
setFilter(val.searchparam)
|
|
430
|
-
)}
|
|
431
|
-
/>
|
|
432
|
-
{isBNUL(fnData()) ?
|
|
433
|
-
<FlatList
|
|
434
|
-
data={fnData()}
|
|
435
|
-
style={{ width: '100%' }}
|
|
436
|
-
renderItem={renderItem}
|
|
437
|
-
keyExtractor={(item, index) => 'key' + index}
|
|
438
|
-
initialNumToRender={3}
|
|
439
|
-
/>
|
|
440
|
-
: null}
|
|
441
|
-
</View>
|
|
442
|
-
);
|
|
443
|
-
};
|
|
444
|
-
export default CWardStatus;
|