@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.7
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/dist/Common/ErrorBoundary.d.ts +15 -0
- package/dist/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/Common/ErrorBoundary.js +64 -0
- package/dist/Common/ErrorBoundary.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Common/ErrorBoundary.d.ts +15 -0
- package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/Common/ErrorBoundary.js +64 -0
- package/dist/src/Common/ErrorBoundary.js.map +1 -0
- package/package.json +17 -5
- package/.gitattributes +0 -2
- package/index.d.ts +0 -66
- package/index.js +0 -66
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- package/src/Common/ErrorBoundary.tsx +0 -73
- 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
package/src/Custom/CCard.js
DELETED
|
@@ -1,880 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState, useRef, memo, useCallback, useMemo } from 'react';
|
|
2
|
-
import { Text, View, Image, TouchableHighlight, TouchableOpacity, TouchableWithoutFeedback, StyleSheet, ImageBackground, FlatList, ActivityIndicator, Platform, TextInput, Alert, ScrollView } from 'react-native';
|
|
3
|
-
import { SwipeListView, SwipeRow } from 'react-native-swipe-list-view';
|
|
4
|
-
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
-
import { ArrayCheck, CButtonShadow, getLoading, getProfilecardOnlineStatusBadgeContainer, isBNU, isBNUL, isNU, isNUQ, isNUQZ, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
6
|
-
import { APIURL, EMRAPI } from '../../../../../src/Common/apiConstants';
|
|
7
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
8
|
-
import CVectorIcon from '../CustomComponents/CVectorIcon';
|
|
9
|
-
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
10
|
-
import HOverlay from '../../../../../src/HOC/HOverlay';
|
|
11
|
-
import Loader from './Loader';
|
|
12
|
-
import { Loader as LoaderLocal } from '../CommonStyle/ComponentFunctions';
|
|
13
|
-
import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
|
|
14
|
-
import moment from 'moment';
|
|
15
|
-
import ABlink from '../Alerts/ABlink';
|
|
16
|
-
import HOCIcons from '../HOC/HOCIcons';
|
|
17
|
-
import FastImage from 'react-native-fast-image';
|
|
18
|
-
import { Menu, MenuOptions, MenuTrigger } from 'react-native-popup-menu';
|
|
19
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import CDetailCard from './CDetailCard';
|
|
23
|
-
|
|
24
|
-
function GetCard(props) {
|
|
25
|
-
|
|
26
|
-
const navigation = useNavigation();
|
|
27
|
-
const [data, setData] = useState(props.data);
|
|
28
|
-
const listRef = useRef();
|
|
29
|
-
const [overlay, setOverlay] = useState(false);
|
|
30
|
-
const [iconsArr, setIconsArr] = useState([
|
|
31
|
-
{ 'iconname': 'pills', 'stage': 1, 'color': '#F5EEE6', 'selected': false, 'displaytext': 'Prescription' },
|
|
32
|
-
{ 'iconname': 'heartbeat', 'stage': 5, 'color': '#FFF8E3', 'selected': false, 'displaytext': 'Vitals' },
|
|
33
|
-
{ 'iconname': 'user-injured', 'stage': 4, 'color': '#F3D7CA', 'selected': false, 'displaytext': 'Services' },
|
|
34
|
-
{ 'iconname': 'file-medical', 'stage': 0, 'color': '#E6A4B4', 'selected': false, 'displaytext': 'Chart' }]);
|
|
35
|
-
const [activity, setActivity] = useState(false);
|
|
36
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
37
|
-
const [refresh, setRefresh] = useState(0);
|
|
38
|
-
const moveToTop = () => listRef.current.scrollToIndex({ index: 0 });
|
|
39
|
-
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
setData(props.data);
|
|
42
|
-
}, [props]);
|
|
43
|
-
|
|
44
|
-
const newData = isBNUL(data) &&
|
|
45
|
-
data.filter(function (item) {
|
|
46
|
-
var badge = ValueCheck(item.profilecontent[0][props.filter]) ? item.profilecontent[0][props.filter] : '';
|
|
47
|
-
var patientno = ValueCheck(item.profilecontent[0].patientno) ? item.profilecontent[0].patientno : '';
|
|
48
|
-
const dataItem = badge + '' + item.profilecontent[0].patientname + ' ' + patientno + ' ';
|
|
49
|
-
const textData = props.search != null ? props.search.toUpperCase() : '';
|
|
50
|
-
return dataItem.indexOf(textData) > -1;
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
function getSpelling(data) {
|
|
54
|
-
if (data == 'FIRST VISIT') {
|
|
55
|
-
return ['N', 'e', 'w'];
|
|
56
|
-
}
|
|
57
|
-
else if (data == 'RENEWAL') {
|
|
58
|
-
return ['R', 'e', 'n', 'e', 'w', 'a', 'l'];
|
|
59
|
-
}
|
|
60
|
-
else if (data == 'CROSS CONSULTATION') {
|
|
61
|
-
return ['C', 'r', 'o', 's', 's', '.', 'C'];
|
|
62
|
-
}
|
|
63
|
-
else if (data == 'REVISIT') {
|
|
64
|
-
return ['R', 'e', 'v', 'i', 's', 'i', 't'];
|
|
65
|
-
}
|
|
66
|
-
else if (data == 'REGISTRATION') {
|
|
67
|
-
return ['R', 'e', 'g'];
|
|
68
|
-
}
|
|
69
|
-
else if (data == 'REFFERED') {
|
|
70
|
-
return ['R', 'e', 'f', 'f', 'e', 'r', 'e', 'd'];
|
|
71
|
-
}
|
|
72
|
-
else if (data == 'OPINION VISIT') {
|
|
73
|
-
return ['O', 'p', 'i', 'n', 'i', 'o', 'n', 'V'];
|
|
74
|
-
}
|
|
75
|
-
else if (data == 'ROUNDS') {
|
|
76
|
-
return ['R', 'o', 'u', 'n', 'd', 's'];
|
|
77
|
-
}
|
|
78
|
-
else if (data == 'DEPARTMENT REGISTRATION') {
|
|
79
|
-
return ['D', 'e', 'p', 't', '.', 'R', 'e', 'g'];
|
|
80
|
-
}
|
|
81
|
-
else if (data == 'ADMISSION') {
|
|
82
|
-
return ['A', 'd', 'm', 'i', 's', 's', 'i', 'o', 'n'];
|
|
83
|
-
}
|
|
84
|
-
else if (data == 'MLC') {
|
|
85
|
-
return ['M', 'L', 'C'];
|
|
86
|
-
}
|
|
87
|
-
else if (data == 'BOOKING') {
|
|
88
|
-
return ['B', 'O', 'O', 'K', 'I', 'N', 'G'];
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
return ['O', 'P'];
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function getXRay(data) {
|
|
96
|
-
Global.PatientDetails = data.item;
|
|
97
|
-
console.log('getXRay', data.item);
|
|
98
|
-
if (isNU(data.item.profilecontent) && isNU(data.item.profilecontent[0]) && isNU(data.item.profilecontent[0].patientno) && isNU(Global.hospitalcode) && Global.hospitalcode == 'DH9192') {
|
|
99
|
-
props.navigation.navigate('CXRay', { data: { link: `${'http://103.171.224.161:5000/mobile/?patientid='}${data.item.profilecontent[0].patientno}` } });
|
|
100
|
-
}
|
|
101
|
-
else if (isNU(data.item.profilecontent) && isNU(data.item.profilecontent[0]) && isNU(data.item.profilecontent[0].patientno) && isNU(Global.hospitalcode) && Global.hospitalcode == 'AIMS8090') {
|
|
102
|
-
props.navigation.navigate('CXRay', { data: { link: `${'http://pacs.amalaims.org:23666/Launch_Viewer.asp?username=hisuser&password=hisuser&patientid='}${data.item.profilecontent[0].patientno}` } });
|
|
103
|
-
}
|
|
104
|
-
else if (isNU(data.item.profilecontent) && isNU(data.item.profilecontent[0]) && isNU(data.item.profilecontent[0].patientno) && isNU(Global.hospitalcode) && Global.hospitalcode == 'NMC8090') {
|
|
105
|
-
notifyMessage('Incorporate Soon', 5);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
notifyMessage('Incorporate Soon', 5);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function getLabResults(data, type) {
|
|
114
|
-
Global.PatientDetails = data.item;
|
|
115
|
-
props.navigation.navigate('CValueSummary', { type: type });
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function getInvestigations(patientitem) {
|
|
119
|
-
Global.PatientDetails = patientitem;
|
|
120
|
-
props.navigation.navigate('CValueSummary');
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function getConsultationScreenData(patientitem) {
|
|
124
|
-
if (ValueCheck(patientitem.detailapi)) {
|
|
125
|
-
Global.EditStatus = null;
|
|
126
|
-
Global.PatientDetails = patientitem;
|
|
127
|
-
props.navigation.navigate('Consultation');
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function getMedication(patientitem) {
|
|
132
|
-
Global.PatientDetails = patientitem;
|
|
133
|
-
props.navigation.navigate('CalendarMedications');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function getOverlayScreen() {
|
|
137
|
-
// setOverlay(true)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const keyExtractor = useCallback(
|
|
141
|
-
(item) => item.datalistid.toString(),
|
|
142
|
-
[]);
|
|
143
|
-
|
|
144
|
-
function fnMapStatus(i, array) {
|
|
145
|
-
isBNUL(array) ? array.filter((val, k) => { val.inconsultation != null && val.inconsultation != undefined && k != i ? (val.inconsultation = false) : null; }) : null;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function getTokenStatusList(val) {
|
|
149
|
-
|
|
150
|
-
let buttonapi = EMRAPI.getPatientData + Global.userData.hosuconsultant;
|
|
151
|
-
console.log('getPatientData buttonapi', buttonapi);
|
|
152
|
-
|
|
153
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
154
|
-
.then(function (response) {
|
|
155
|
-
console.log('RESPONSEEEEEEEE patienttoken status', JSON.stringify(response));
|
|
156
|
-
if (isNU(response.data) && isBNUL(response.data.data)) {
|
|
157
|
-
|
|
158
|
-
const array2Map = new Map(response.data.data.map(item => [item.hopapatient, item.patientstatus]));
|
|
159
|
-
|
|
160
|
-
val.forEach(item => {
|
|
161
|
-
if (array2Map.has(item.hopapatient)) {
|
|
162
|
-
item.patientstatus = array2Map.get(item.hopapatient);
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function savePatientConsultation(blockData, array) {
|
|
172
|
-
|
|
173
|
-
setIsLoading(true);
|
|
174
|
-
let output = {
|
|
175
|
-
'groups': {
|
|
176
|
-
'procedurename': 'hopaconsultation1',
|
|
177
|
-
'hosuconsultant': Global.userData.hosuconsultant,
|
|
178
|
-
'hopapatient': blockData.item.hopapatient,
|
|
179
|
-
},
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
let buttonapi = APIURL + 'commondelete/RnCommonDelete';
|
|
183
|
-
console.log('output', output, buttonapi);
|
|
184
|
-
|
|
185
|
-
getTokenStatusList(array);
|
|
186
|
-
|
|
187
|
-
NetworkServiceCall('post', buttonapi, output)
|
|
188
|
-
.then(function (response) {
|
|
189
|
-
console.log('response of saved.....', JSON.stringify(response));
|
|
190
|
-
if (response.httpstatus == 200) {
|
|
191
|
-
fnMapStatus(blockData.index, newData);
|
|
192
|
-
blockData.item.consultationstart = true;
|
|
193
|
-
blockData.item.inconsultation = true;
|
|
194
|
-
setIsLoading(false);
|
|
195
|
-
(ValueCheck(props.medications) ? getMedication(blockData.item) : props.disableTouch != undefined && props.disableTouch != null ? getOverlayScreen() : ValueCheck(props.type) && props.type == 1 ? getInvestigations(blockData.item) : getConsultationScreenData(blockData.item));
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
notifyMessage('Data not saved', 2);
|
|
199
|
-
setIsLoading(false);
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
getLoading(v => setIsLoading(false));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function fnGetConsultaionAdmissionHistory(blockData) {
|
|
206
|
-
if (isNU(blockData.item.hopapatient)) {
|
|
207
|
-
let buttonapi = EMRAPI.getConsultationAdmissionHistory + blockData.item.hopapatient;
|
|
208
|
-
console.log('fnGetConsultaionAdmissionHistory', buttonapi);
|
|
209
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
210
|
-
.then(function (response) {
|
|
211
|
-
if (isNU(response.data)) {
|
|
212
|
-
blockData.item.cardbottomviewloading = false;
|
|
213
|
-
blockData.item.cardbottomviewdata = {
|
|
214
|
-
'consultationdetails': isBNUL(response.data.consultationdetails) ? response.data.consultationdetails : [],
|
|
215
|
-
'admissiondetails': isBNUL(response.data.admissiondetails) ? response.data.admissiondetails : [],
|
|
216
|
-
};
|
|
217
|
-
setRefresh(0);
|
|
218
|
-
setTimeout(() => {
|
|
219
|
-
setRefresh(refresh + 1);
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
blockData.item.cardbottomviewloading = false;
|
|
224
|
-
|
|
225
|
-
setRefresh(0);
|
|
226
|
-
setTimeout(() => {
|
|
227
|
-
setRefresh(refresh + 1);
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
blockData.item.cardbottomviewloading = false;
|
|
234
|
-
notifyMessage('Data Not Found.');
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
function NavigateToPatientChart(blockData, specificnature, customdate, fromdate, todate) {
|
|
239
|
-
|
|
240
|
-
setIsLoading(true);
|
|
241
|
-
Global.consultationapi = blockData.item.detailapi;
|
|
242
|
-
Global.PatientDetails = blockData.item;
|
|
243
|
-
setTimeout(() => {
|
|
244
|
-
props.navigation.navigate('ChartScreenNew', {
|
|
245
|
-
specificnature: specificnature,
|
|
246
|
-
customdate: customdate ? true : false,
|
|
247
|
-
fromdate: fromdate,
|
|
248
|
-
todate: todate,
|
|
249
|
-
});
|
|
250
|
-
setIsLoading(false);
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function navigateToVitalSignReport(blockData) {
|
|
256
|
-
|
|
257
|
-
setIsLoading(true);
|
|
258
|
-
Global.consultationapi = blockData.item.detailapi;
|
|
259
|
-
Global.PatientDetails = blockData.item;
|
|
260
|
-
setTimeout(() => {
|
|
261
|
-
navigation.navigate('PdfPreview', {
|
|
262
|
-
'headerblockstyle': { marginBottom: normalize(35) },
|
|
263
|
-
// 'link': APIURL + "jremr/jrcommonreport/jrhosuconsultanttokenreport(0," + Global.userData.hosuconsultant + ")/0/consulttoken",
|
|
264
|
-
'link': `${APIURL}jremr/jrcommonreport/rnhopapatientvitalsign(${blockData.item.hopapatient},${blockData.item.homrpatientchart},NULL,NULL,NULL,1)/0/VitalSignDetail`,
|
|
265
|
-
});
|
|
266
|
-
setIsLoading(false);
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function FnChangeTab(array, i) {
|
|
271
|
-
isBNUL(array) ? array.filter((val, k) => { (val.selected = false); }) : null;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
function renderAdmissionConsultationlist(array, blockData, admissiontype) {
|
|
275
|
-
|
|
276
|
-
return (
|
|
277
|
-
<ScrollView>
|
|
278
|
-
{isBNUL(array) ?
|
|
279
|
-
<FlatList
|
|
280
|
-
nestedScrollEnabled={true}
|
|
281
|
-
data={array}
|
|
282
|
-
initialNumToRender={6}
|
|
283
|
-
maxToRenderPerBatch={10}
|
|
284
|
-
renderItem={(val) => renderEachAdmissionConsultation(val, blockData, admissiontype)}
|
|
285
|
-
/>
|
|
286
|
-
: null}
|
|
287
|
-
</ScrollView>
|
|
288
|
-
);
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function renderEachAdmissionConsultation(val, blockData, admissiontype) {
|
|
293
|
-
|
|
294
|
-
return (
|
|
295
|
-
<CDetailCard
|
|
296
|
-
val={val}
|
|
297
|
-
blockData={blockData}
|
|
298
|
-
admissiontype={admissiontype}
|
|
299
|
-
NavigateToPatientChart={NavigateToPatientChart}
|
|
300
|
-
getXRay={getXRay}
|
|
301
|
-
getLabResults={getLabResults}
|
|
302
|
-
/>
|
|
303
|
-
);
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
function renderCardNew(blockData) {
|
|
308
|
-
|
|
309
|
-
return (
|
|
310
|
-
<>
|
|
311
|
-
<SwipeRow
|
|
312
|
-
swipeToOpenPercent={1}
|
|
313
|
-
swipeToClosePercent={1}
|
|
314
|
-
leftOpenValue={normalize(190)}
|
|
315
|
-
rightOpenValue={-normalize(100)}
|
|
316
|
-
style={{
|
|
317
|
-
borderRadius: 10,
|
|
318
|
-
width: '100%',
|
|
319
|
-
marginBottom: normalize(7),
|
|
320
|
-
// marginTop: normalize(5),
|
|
321
|
-
}}
|
|
322
|
-
>
|
|
323
|
-
<View style={{ alignItems: 'center', borderWidth: 0, flexDirection: 'row', justifyContent: 'space-between', borderRadius: 10 }}>
|
|
324
|
-
<View style={{ flexDirection: 'row', width: '100%', alignItems: 'center', justifyContent: 'center', borderWidth: 0, backgroundColor: 'white', height: normalize(45), borderRadius: 10 }}>
|
|
325
|
-
<View style={{ width: '60%', justifyContent: 'center', alignItems: 'flex-start' }}>
|
|
326
|
-
<View>
|
|
327
|
-
{ValueCheck(blockData.item.leftcontent) ?
|
|
328
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
|
|
329
|
-
{isBNUL(iconsArr) ? iconsArr.map((iconsFoot, i) => {
|
|
330
|
-
return (
|
|
331
|
-
<TouchableOpacity key={i}
|
|
332
|
-
onPress={() => NavigateToPatientChart(blockData, iconsFoot.stage, false, '', '')}
|
|
333
|
-
style={{ backgroundColor: iconsFoot.color, alignItems: 'center', justifyContent: 'center', width: normalize(45), height: normalize(45), borderTopLeftRadius: (i == 0) ? 10 : 0, borderBottomLeftRadius: (i == 0) ? 10 : 0 }}
|
|
334
|
-
>
|
|
335
|
-
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
|
|
336
|
-
<Icons.FontAwesome5 name={iconsFoot.iconname} size={normalize(20)} color={Global.AppTheme.primary_color} style={{}} />
|
|
337
|
-
<Text style={{ fontSize: normalize(8), fontWeight: 'bold' }}>{iconsFoot.displaytext}</Text>
|
|
338
|
-
</View>
|
|
339
|
-
</TouchableOpacity>
|
|
340
|
-
);
|
|
341
|
-
}) : null}
|
|
342
|
-
</View> : null}
|
|
343
|
-
</View>
|
|
344
|
-
</View>
|
|
345
|
-
|
|
346
|
-
<View style={{ borderWidth: 0, width: '40%', alignItems: 'center', justifyContent: 'flex-end', flexDirection: 'row' }}>
|
|
347
|
-
<TouchableOpacity
|
|
348
|
-
disabled={false}
|
|
349
|
-
onPress={() => { getXRay(blockData); }}
|
|
350
|
-
style={{ height: normalize(45), width: normalize(45), backgroundColor: '#FFC374', alignItems: 'center', justifyContent: 'center', padding: normalize(7), borderWidth: 0 }}
|
|
351
|
-
>
|
|
352
|
-
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
|
|
353
|
-
<Icons.FontAwesome5 name={'x-ray'} size={normalize(24)} color={Global.AppTheme.primary_color} style={{}} />
|
|
354
|
-
<Text style={{ fontSize: normalize(7), fontWeight: 'bold' }}>{'X-Ray'}</Text>
|
|
355
|
-
</View>
|
|
356
|
-
</TouchableOpacity>
|
|
357
|
-
|
|
358
|
-
<TouchableOpacity
|
|
359
|
-
disabled={blockData.item.hopapatient > 0 ? false : true}
|
|
360
|
-
onPress={() => getLabResults(blockData, false)}
|
|
361
|
-
style={{ height: normalize(45), width: normalize(45), backgroundColor: '#E1F0DA', alignItems: 'center', justifyContent: 'center', borderTopRightRadius: 10, borderBottomRightRadius: 10 }}
|
|
362
|
-
>
|
|
363
|
-
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
|
|
364
|
-
<Icons.MaterialCommunityIcons name={'test-tube'} size={normalize(26)} color={Global.AppTheme.primary_color} style={{}} />
|
|
365
|
-
<Text adjustsFontSizeToFit style={{ fontSize: normalize(8), fontWeight: 'bold' }}>{'Lab Results'}</Text>
|
|
366
|
-
</View>
|
|
367
|
-
</TouchableOpacity>
|
|
368
|
-
</View>
|
|
369
|
-
</View>
|
|
370
|
-
</View>
|
|
371
|
-
<View>
|
|
372
|
-
<TouchableHighlight
|
|
373
|
-
style={[{
|
|
374
|
-
height: normalize(45),
|
|
375
|
-
width: '100%',
|
|
376
|
-
alignSelf: 'center',
|
|
377
|
-
backgroundColor: '#fff',
|
|
378
|
-
flexDirection: 'row',
|
|
379
|
-
alignItems: 'center',
|
|
380
|
-
borderRadius: 10,
|
|
381
|
-
borderColor: blockData.item.verified == true ? 'green' : '#094485',
|
|
382
|
-
},
|
|
383
|
-
props.type != undefined && props.type == 2 ?
|
|
384
|
-
{ ...CButtonShadow() } : { ...CButtonShadow() },
|
|
385
|
-
]}
|
|
386
|
-
activeOpacity={0.5}
|
|
387
|
-
underlayColor={'white'}
|
|
388
|
-
disabled={(blockData.item.verified || props.disabled) ? true : false}
|
|
389
|
-
onPress={() => ValueCheck(props.medications) ?
|
|
390
|
-
getMedication(blockData.item)
|
|
391
|
-
: props.disableTouch != undefined
|
|
392
|
-
&& props.disableTouch != null ?
|
|
393
|
-
getOverlayScreen() :
|
|
394
|
-
ValueCheck(props.type) && props.type == 1 ?
|
|
395
|
-
getInvestigations(blockData.item)
|
|
396
|
-
: getConsultationScreenData(blockData.item)}
|
|
397
|
-
>
|
|
398
|
-
<View style={{ flex: 1, backgroundColor: 'white', borderRadius: 10, borderWidth: 0 }}>
|
|
399
|
-
<View style={{
|
|
400
|
-
backgroundColor: (props.type != undefined && props.type == 1) ? '#fff' : blockData.item.verified ? '#f5fffa' : blockData.item.profilecontent[0].patienttype == 'IP' ? '#fffafa' : props.type != undefined && props.type == 2 ? '#fff' : '#f7fbff',
|
|
401
|
-
borderRadius: 10,
|
|
402
|
-
borderColor: 'white',
|
|
403
|
-
flexDirection: 'row',
|
|
404
|
-
justifyContent: 'flex-end',
|
|
405
|
-
minHeight: normalize(45),
|
|
406
|
-
}}>
|
|
407
|
-
{ArrayCheck(blockData.item.leftcontent) ?
|
|
408
|
-
<View style={{ zIndex: 1, alignItems: 'center', justifyContent: 'center', left: normalize(22) }}>
|
|
409
|
-
<Icons.MaterialCommunityIcons
|
|
410
|
-
name={'chevron-left'}
|
|
411
|
-
size={normalize(18)}
|
|
412
|
-
color={'grey'}
|
|
413
|
-
style={{ opacity: 1 }}
|
|
414
|
-
/>
|
|
415
|
-
</View> : null}
|
|
416
|
-
|
|
417
|
-
{blockData.item.verified ? (
|
|
418
|
-
<View style={{ borderBottomLeftRadius: 10, borderTopStartRadius: 10, backgroundColor: 'green', alignItems: 'center', justifyContent: 'center', width: '3%', flexDirection: 'column' }}>
|
|
419
|
-
{['V', 'e', 'r', 'i', 'f', 'i', 'e', 'd'].map((item, i) => {
|
|
420
|
-
return (
|
|
421
|
-
<Text key={i} style={{ fontSize: normalize(5), fontWeight: 'bold', color: 'white' }}>
|
|
422
|
-
{item}
|
|
423
|
-
</Text>
|
|
424
|
-
);
|
|
425
|
-
})}
|
|
426
|
-
</View>
|
|
427
|
-
) :
|
|
428
|
-
blockData.item.profilecontent[0].patienttype == 'IP' ?
|
|
429
|
-
<View style={{ borderBottomLeftRadius: 10, borderTopStartRadius: 10, backgroundColor: '#ea6767', alignItems: 'center', justifyContent: 'center', width: '3%', flexDirection: 'column' }}>
|
|
430
|
-
{['R', 'O', 'U', 'N', 'D', 'S'].map((item, i) => {
|
|
431
|
-
return (
|
|
432
|
-
<Text key={i} style={{ fontSize: normalize(6), fontWeight: 'bold', color: 'white' }}>
|
|
433
|
-
{item}
|
|
434
|
-
</Text>
|
|
435
|
-
);
|
|
436
|
-
})}
|
|
437
|
-
</View>
|
|
438
|
-
:
|
|
439
|
-
<View style={{ borderBottomLeftRadius: 10, borderTopStartRadius: 10, backgroundColor: blockData.item.profilecontent[0].logo1 == 'FIRST VISIT' ? '#094485' : blockData.item.profilecontent[0].logo1 == 'RENEWAL' || blockData.item.profilecontent[0].logo1 == 'REVISIT' ? '#3b86db' : blockData.item.profilecontent[0].logo1 == 'MLC' ? '#FF0000' : blockData.item.profilecontent[0].logo1 == 'CROSS CONSULTATION' ? '#fca671' : blockData.item.profilecontent[0].logo1 == 'BOOKED' || blockData.item.profilecontent[0].logo1 == 'BOOKING' ? '#7a1241' : '#3b86db', alignItems: 'center', justifyContent: 'center', width: '3%', flexDirection: 'column' }}>
|
|
440
|
-
{getSpelling(blockData.item.profilecontent[0].logo1).map((item, k) => {
|
|
441
|
-
return (
|
|
442
|
-
<Text key={k} style={{ textShadowColor: 'black', textShadowRadius: 1, textShadowOffset: { width: 0, height: 1 }, textAlign: 'center', fontSize: normalize(6), fontWeight: 'bold', color: 'white' }}>
|
|
443
|
-
{item}
|
|
444
|
-
</Text>
|
|
445
|
-
);
|
|
446
|
-
})}
|
|
447
|
-
</View>}
|
|
448
|
-
|
|
449
|
-
<View style={{ width: '95%', flexDirection: 'row' }}>
|
|
450
|
-
<View style={{ flexDirection: 'row', padding: normalize(5), borderWidth: 0, width: '70%' }}>
|
|
451
|
-
<TouchableWithoutFeedback>
|
|
452
|
-
<TouchableOpacity
|
|
453
|
-
onPress={() => { NavigateToPatientChart(blockData, null, false, '', ''); }}
|
|
454
|
-
style={{ marginLeft: normalize(5), borderWidth: 0, borderColor: blockData.item.verified ? 'green' : blockData.item.profilecontent[0].patienttype == 'IP' ? '#ea6767' : '#3b86db', borderRadius: 1000 }}
|
|
455
|
-
>
|
|
456
|
-
<FastImage style={{ width: normalize(35), height: normalize(35), borderRadius: 1000, resizeMode: 'contain' }}
|
|
457
|
-
source={isNUQ(blockData.item.profilecontent[0].patientimage) ? { uri: EMRAPI.getPatientProfile + blockData.item.profilecontent[0].patientimage } : blockData.item.profilecontent[0].gender == 'MALE' ? {uri: `${APIURL}file/getCommonFile/image/Male(2).png`} : {uri: `${APIURL}file/getCommonFile/image/FemaleI(1).png`}}
|
|
458
|
-
/>
|
|
459
|
-
</TouchableOpacity>
|
|
460
|
-
</TouchableWithoutFeedback>
|
|
461
|
-
|
|
462
|
-
<View style={{ alignItems: 'flex-start', justifyContent: 'center', borderWidth: 0 }}>
|
|
463
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', borderWidth: 0 }}>
|
|
464
|
-
<Text style={{ fontSize: normalize(14), paddingLeft: normalize(5), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>
|
|
465
|
-
{blockData.item.profilecontent[0].patientname}
|
|
466
|
-
</Text>
|
|
467
|
-
<View style={{ flexDirection: 'row' }}>
|
|
468
|
-
{blockData.item.profilecontent[0].infectioncontrol &&
|
|
469
|
-
blockData.item.profilecontent[0].infectioncontrol != null &&
|
|
470
|
-
blockData.item.profilecontent[0].infectioncontrol != undefined &&
|
|
471
|
-
blockData.item.profilecontent[0].infectioncontrol != 'undefined' &&
|
|
472
|
-
blockData.item.profilecontent[0].infectioncontrol.length > 0 ?
|
|
473
|
-
blockData.item.profilecontent[0].infectioncontrol.map((data, i) => {
|
|
474
|
-
return (
|
|
475
|
-
<Text key={i} style={{ fontSize: normalize(12), color: 'red' }}>{' '}{data.infectioncontrol != undefined ? '(' + data.infectioncontrol + ')' : '' + ' '}</Text>
|
|
476
|
-
);
|
|
477
|
-
}) : null}
|
|
478
|
-
</View>
|
|
479
|
-
</View>
|
|
480
|
-
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center', borderWidth: 0 }}>
|
|
481
|
-
{isBNU(blockData.item.profilecontent[0].patientno) ?
|
|
482
|
-
<Menu>
|
|
483
|
-
<MenuTrigger customStyles={{ triggerWrapper: {} }} >
|
|
484
|
-
<Text selectable style={{ marginLeft: normalize(3), fontSize: normalize(12), color: 'black', fontWeight: 'bold' }}>
|
|
485
|
-
{blockData.item.profilecontent[0].patientno}
|
|
486
|
-
</Text>
|
|
487
|
-
</MenuTrigger>
|
|
488
|
-
<MenuOptions optionsContainerStyle={{ marginTop: normalize(15) }} customStyles={{ optionsContainer: { width: '30%', backgroundColor: '#f0f0f0', borderRadius: 10, borderWidth: 1, borderColor: 'lightgrey' }, optionText: {} }}>
|
|
489
|
-
<View style={{ borderWidth: 0, padding: normalize(5), justifyContent: 'center', alignItems: 'center' }}>
|
|
490
|
-
<Text style={{ letterSpacing: 5, fontSize: normalize(15), color: 'black', fontWeight: 'bold' }} selectable>{blockData.item.profilecontent[0].patientno}</Text>
|
|
491
|
-
<View style={{ flexDirection: 'row' }}>
|
|
492
|
-
<HOCIcons.Feather
|
|
493
|
-
name={'info'}
|
|
494
|
-
size={normalize(10)}
|
|
495
|
-
color={'grey'}
|
|
496
|
-
style={{ marginHorizontal: normalize(3) }}
|
|
497
|
-
/>
|
|
498
|
-
<Text style={{ color: 'grey', fontSize: normalize(8), fontStyle: 'italic' }}>long press to copy</Text>
|
|
499
|
-
</View>
|
|
500
|
-
</View>
|
|
501
|
-
</MenuOptions>
|
|
502
|
-
</Menu>
|
|
503
|
-
: null}
|
|
504
|
-
<Text style={{ fontSize: normalize(10), paddingLeft: normalize(5), fontWeight: 'normal', color: 'black' }}>{blockData.item.profilecontent[0].gender}</Text>
|
|
505
|
-
<Text style={{ fontSize: normalize(10), paddingLeft: normalize(5), fontWeight: 'normal', color: 'black' }}>{blockData.item.profilecontent[0].age}</Text>
|
|
506
|
-
{isNUQ(blockData.item.profilecontent[0].subheading3) ?
|
|
507
|
-
<Icons.FontAwesome5
|
|
508
|
-
name={'home'}
|
|
509
|
-
color={Global.AppTheme.primary_color}
|
|
510
|
-
size={normalize(9)}
|
|
511
|
-
style={{ marginHorizontal: normalize(2) }}
|
|
512
|
-
/>
|
|
513
|
-
: null}
|
|
514
|
-
<Text style={{ fontSize: normalize(10), paddingLeft: normalize(5), fontWeight: 'normal', color: 'black' }}>{blockData.item.profilecontent[0].subheading3}</Text>
|
|
515
|
-
<View style={{ flexDirection: 'row', alignSelf: 'flex-end', position: 'absolute', right: 0 }}>
|
|
516
|
-
{ValueCheck(blockData.item.investigations) &&
|
|
517
|
-
ArrayCheck(blockData.item.investigations) ?
|
|
518
|
-
(blockData.item.investigations).map((item, i) => {
|
|
519
|
-
return (
|
|
520
|
-
<TouchableOpacity key={i}
|
|
521
|
-
onPress={() => getLabResults(blockData, true)}
|
|
522
|
-
style={{ alignItems: 'center', marginLeft: normalize(0), justifyContent: 'center' }}
|
|
523
|
-
>
|
|
524
|
-
<ABlink>
|
|
525
|
-
<View
|
|
526
|
-
style={{
|
|
527
|
-
width: normalize(35),
|
|
528
|
-
height: normalize(35),
|
|
529
|
-
borderRadius: normalize(35) / 2,
|
|
530
|
-
justifyContent: 'center',
|
|
531
|
-
borderColor: item.color,
|
|
532
|
-
alignItems: 'center',
|
|
533
|
-
backgroundColor: '#fff',
|
|
534
|
-
}}>
|
|
535
|
-
<Icons.FontAwesome5 name={item.iconname} size={normalize(23)} color={item.color} />
|
|
536
|
-
<Text numberOfLines={1} style={{ color: 'black', fontSize: normalize(8), fontWeight: '600', paddingTop: normalize(0) }}>{item.displaytext}</Text>
|
|
537
|
-
</View>
|
|
538
|
-
</ABlink>
|
|
539
|
-
</TouchableOpacity>
|
|
540
|
-
);
|
|
541
|
-
})
|
|
542
|
-
: null}
|
|
543
|
-
</View>
|
|
544
|
-
</View>
|
|
545
|
-
{isBNUL(blockData.item.cardbottomarray) && isBNUL(blockData.item.profilecontent) && isNU(blockData.item.profilecontent[0].mobileno) ?
|
|
546
|
-
<View style={{ flexDirection: 'row', borderWidth: 0, alignItems: 'center' }}>
|
|
547
|
-
<HOCIcons.Icons
|
|
548
|
-
icongroup={5}
|
|
549
|
-
size={normalize(9)}
|
|
550
|
-
name={'phone-alt'}
|
|
551
|
-
color={Global.AppTheme.primary_color}
|
|
552
|
-
style={{ paddingHorizontal: normalize(3) }}
|
|
553
|
-
/>
|
|
554
|
-
<Text style={{ fontSize: normalize(10), color: 'black', fontWeight: 'bold' }}>
|
|
555
|
-
{isNU(blockData.item.profilecontent[0].mobileno) ? blockData.item.profilecontent[0].mobileno : null}
|
|
556
|
-
</Text>
|
|
557
|
-
</View>
|
|
558
|
-
: null}
|
|
559
|
-
</View>
|
|
560
|
-
</View>
|
|
561
|
-
|
|
562
|
-
{blockData.item.profilecontent[0].badgenumber && blockData.item.profilecontent[0].badgenumber != null && blockData.item.profilecontent[0].badgenumber != undefined ?
|
|
563
|
-
<TouchableWithoutFeedback>
|
|
564
|
-
<View style={{ width: '30%', justifyContent: 'flex-end', alignItems: 'center', borderWidth: 0, flexDirection: 'row' }}>
|
|
565
|
-
{isBNUL(blockData.item.vitalsignstatus) && isNUQ(blockData.item.vitalsignstatus[0].hopapatientobservationnature) ?
|
|
566
|
-
<View style={{ position: 'absolute', top: 0, left: 0, borderWidth: 0 }}>
|
|
567
|
-
<TouchableOpacity
|
|
568
|
-
onPress={() => { navigateToVitalSignReport(blockData); }}
|
|
569
|
-
style={{ borderWidth: 0, justifyContent: 'center', alignItems: 'center', flexDirection: 'row' }}
|
|
570
|
-
>
|
|
571
|
-
<ABlink duration={1000}>
|
|
572
|
-
<View style={{ borderWidth: 1, borderColor: 'lightgrey', borderRadius: 5, marginHorizontal: normalize(5), justifyContent: 'center', alignItems: 'center' }}>
|
|
573
|
-
<HOCIcons.MaterialCommunityIcons
|
|
574
|
-
name={'clipboard-pulse'}
|
|
575
|
-
size={normalize(22)}
|
|
576
|
-
color={isNUQ(blockData.item.vitalsignstatus[0].color) ? blockData.item.vitalsignstatus[0].color : Global.AppTheme.primary_color}
|
|
577
|
-
/>
|
|
578
|
-
<Text numberOfLines={1}
|
|
579
|
-
style={{
|
|
580
|
-
fontSize: normalize(8),
|
|
581
|
-
color: isNUQ(blockData.item.vitalsignstatus[0].color) ? blockData.item.vitalsignstatus[0].color : Global.AppTheme.primary_color,
|
|
582
|
-
fontWeight: 'normal',
|
|
583
|
-
textAlign: 'center',
|
|
584
|
-
width: normalize(40),
|
|
585
|
-
}}>
|
|
586
|
-
{blockData.item.vitalsignstatus[0].hopapatientobservationnature}
|
|
587
|
-
</Text>
|
|
588
|
-
</View>
|
|
589
|
-
</ABlink>
|
|
590
|
-
</TouchableOpacity>
|
|
591
|
-
</View>
|
|
592
|
-
: null}
|
|
593
|
-
{props.consultationmode && isNU(blockData.item.patientstatus) && blockData.item.patientstatus == 'Y' ?
|
|
594
|
-
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
|
|
595
|
-
<HOCIcons.Icons
|
|
596
|
-
icongroup={2}
|
|
597
|
-
size={normalize(20)}
|
|
598
|
-
name={'emoji-people'}
|
|
599
|
-
color={'green'}
|
|
600
|
-
/>
|
|
601
|
-
</View>
|
|
602
|
-
: null}
|
|
603
|
-
<TouchableOpacity
|
|
604
|
-
onPress={() => {
|
|
605
|
-
if (isBNUL(blockData.item.cardbottomarray)) {
|
|
606
|
-
blockData.item.cardbottomviewloading = false;
|
|
607
|
-
blockData.item.cardbottomviewdata = null;
|
|
608
|
-
blockData.item.cardbottomarray = [];
|
|
609
|
-
setRefresh(0);
|
|
610
|
-
setTimeout(() => {
|
|
611
|
-
setRefresh(refresh + 1);
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
else {
|
|
615
|
-
blockData.item.cardbottomarray = [
|
|
616
|
-
{
|
|
617
|
-
code: 1,
|
|
618
|
-
name: 'ADMISSION',
|
|
619
|
-
selected: true,
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
code: 2,
|
|
623
|
-
name: 'CONSULTATION',
|
|
624
|
-
selected: false,
|
|
625
|
-
},
|
|
626
|
-
];
|
|
627
|
-
blockData.item.cardbottomviewloading = true;
|
|
628
|
-
setRefresh(0);
|
|
629
|
-
setTimeout(() => {
|
|
630
|
-
setRefresh(refresh + 1);
|
|
631
|
-
fnGetConsultaionAdmissionHistory(blockData);
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
}}
|
|
635
|
-
style={{
|
|
636
|
-
borderWidth: 0.5,
|
|
637
|
-
borderColor: 'lightgrey',
|
|
638
|
-
borderRadius: 100,
|
|
639
|
-
padding: normalize(4),
|
|
640
|
-
justifyContent: 'center',
|
|
641
|
-
alignItems: 'center',
|
|
642
|
-
alignSelf: 'flex-end',
|
|
643
|
-
}}>
|
|
644
|
-
<View
|
|
645
|
-
style={{
|
|
646
|
-
borderRadius: 5,
|
|
647
|
-
borderColor: 'lightgrey',
|
|
648
|
-
justifyContent: 'center',
|
|
649
|
-
alignItems: 'center',
|
|
650
|
-
}}
|
|
651
|
-
>
|
|
652
|
-
<HOCIcons.FontAwesome5
|
|
653
|
-
name={isBNUL(blockData.item.cardbottomarray) ? 'chevron-up' : 'chevron-down'}
|
|
654
|
-
size={normalize(14)}
|
|
655
|
-
color={'darkblue'}
|
|
656
|
-
style={{
|
|
657
|
-
opacity: 1,
|
|
658
|
-
marginHorizontal: normalize(3),
|
|
659
|
-
}}
|
|
660
|
-
/>
|
|
661
|
-
</View>
|
|
662
|
-
</TouchableOpacity>
|
|
663
|
-
<View style={{ flexDirection: 'row', borderWidth: 0 }}>
|
|
664
|
-
<View style={{ justifyContent: 'center', alignItems: 'center', marginRight: normalize(5), borderColor: 'lightgrey', borderRadius: 10, borderWidth: 0 }}>
|
|
665
|
-
<TouchableOpacity
|
|
666
|
-
disabled={props.consultationmode ? false : true}
|
|
667
|
-
onLongPress={() => {
|
|
668
|
-
if (blockData.item.consultationstart) {
|
|
669
|
-
}
|
|
670
|
-
else {
|
|
671
|
-
savePatientConsultation(blockData, newData);
|
|
672
|
-
}
|
|
673
|
-
}}
|
|
674
|
-
style={{ borderLeftWidth: props.consultationmode ? 3 : 0, borderBottomWidth: props.consultationmode ? 3 : 0, borderColor: 'grey', width: normalize(35), backgroundColor: blockData.item.inconsultation ? 'darkred' : blockData.item.consultationstart ? '#fc8d32' : '#094485', height: normalize(35), borderRadius: normalize(1000), alignItems: 'center', justifyContent: 'center', elevation: 5, borderWidth: 0 }}
|
|
675
|
-
>
|
|
676
|
-
<Text numberOfLines={1} adjustsFontSizeToFit style={{
|
|
677
|
-
color: 'white',
|
|
678
|
-
fontSize: normalize(17),
|
|
679
|
-
fontWeight: 'bold',
|
|
680
|
-
textAlign: 'center',
|
|
681
|
-
}}>{blockData.item.profilecontent[0].badgenumber}</Text>
|
|
682
|
-
</TouchableOpacity>
|
|
683
|
-
{isNU(blockData.item.consultationtime) ?
|
|
684
|
-
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
|
|
685
|
-
<HOCIcons.MaterialCommunityIcons
|
|
686
|
-
name={'clock-time-seven'}
|
|
687
|
-
size={normalize(10)}
|
|
688
|
-
color={'darkblue'}
|
|
689
|
-
style={{ marginHorizontal: normalize(5) }}
|
|
690
|
-
/>
|
|
691
|
-
<Text style={{ fontWeight: 'bold', color: 'black', fontSize: normalize(10) }}>{isNU(blockData.item.consultationtime) ? blockData.item.consultationtime : null}</Text>
|
|
692
|
-
</View>
|
|
693
|
-
: null}
|
|
694
|
-
</View>
|
|
695
|
-
</View>
|
|
696
|
-
|
|
697
|
-
</View>
|
|
698
|
-
</TouchableWithoutFeedback> : null}
|
|
699
|
-
</View>
|
|
700
|
-
|
|
701
|
-
{ArrayCheck(blockData.item.rightcontent) ?
|
|
702
|
-
<View style={{ zIndex: 1, position: 'absolute', top: normalize(18), alignItems: 'center', justifyContent: 'center', right: 1 }}>
|
|
703
|
-
<Icons.MaterialCommunityIcons
|
|
704
|
-
name={'chevron-right'}
|
|
705
|
-
size={normalize(18)}
|
|
706
|
-
color={'grey'}
|
|
707
|
-
style={{ opacity: 1 }}
|
|
708
|
-
/>
|
|
709
|
-
</View>
|
|
710
|
-
: null}
|
|
711
|
-
|
|
712
|
-
{ValueCheck(blockData.item.bookingstatus) ?
|
|
713
|
-
<View style={{ borderBottomRightRadius: 10, borderTopRightRadius: 10, backgroundColor: '#7a1241', alignItems: 'center', justifyContent: 'center', width: '2%', flexDirection: 'column' }}>
|
|
714
|
-
|
|
715
|
-
{['B', 'o', 'o', 'k', 'e', 'd'].map((item, i) => {
|
|
716
|
-
return (
|
|
717
|
-
<Text key={i} style={{
|
|
718
|
-
fontSize: normalize(6), fontWeight: 'bold', color: 'white',
|
|
719
|
-
}}>{item}</Text>
|
|
720
|
-
);
|
|
721
|
-
})}
|
|
722
|
-
|
|
723
|
-
</View> :
|
|
724
|
-
<View style={{ borderBottomRightRadius: 10, borderTopRightRadius: 10, backgroundColor: blockData.item.profilecontent[0].logo1 == 'FIRST VISIT' ? '#094485' : blockData.item.profilecontent[0].logo1 == 'RENEWAL' || blockData.item.profilecontent[0].logo1 == 'REVISIT' ? '#3b86db' : blockData.item.profilecontent[0].logo1 == 'MLC' ? '#FF0000' : blockData.item.profilecontent[0].logo1 == 'CROSS CONSULTATION' ? '#fca671' : blockData.item.profilecontent[0].logo1 == 'BOOKED' || blockData.item.profilecontent[0].logo1 == 'BOOKING' ? '#7a1241' : '#3b86db', alignItems: 'center', justifyContent: 'center', width: '2%', opacity: 0.7, flexDirection: 'column' }}>
|
|
725
|
-
|
|
726
|
-
{[' '].map((item, i) => {
|
|
727
|
-
return (
|
|
728
|
-
<Text key={i} style={{
|
|
729
|
-
fontSize: normalize(6), fontWeight: 'bold', color: 'white',
|
|
730
|
-
}}>{item}</Text>
|
|
731
|
-
);
|
|
732
|
-
})}
|
|
733
|
-
</View>
|
|
734
|
-
}
|
|
735
|
-
</View>
|
|
736
|
-
</View>
|
|
737
|
-
</TouchableHighlight>
|
|
738
|
-
</View>
|
|
739
|
-
</SwipeRow>
|
|
740
|
-
{isBNUL(blockData.item.cardbottomarray) ?
|
|
741
|
-
<View>
|
|
742
|
-
<View style={{ backgroundColor: 'white', borderRadius: 5, borderWidth: 1, borderColor: 'lightgrey', elevation: 0, width: '99%', flexDirection: 'row', justifyContent: 'space-evenly', alignItems: 'center' }}>
|
|
743
|
-
<View style={{ width: '100%', borderWidth: 0, borderRadius: 5, borderColor: 'grey', justifyContent: 'flex-start', alignItems: 'flex-start' }}>
|
|
744
|
-
<View style={{ borderWidth: 0, elevation: 5, backgroundColor: 'white', borderColor: 'lightgrey', flexDirection: 'row', width: '97%', alignSelf: 'center', marginVertical: normalize(5) }}>
|
|
745
|
-
{blockData.item.cardbottomarray.map((val, i) => {
|
|
746
|
-
return (
|
|
747
|
-
<TouchableOpacity
|
|
748
|
-
onPress={() => {
|
|
749
|
-
FnChangeTab(blockData.item.cardbottomarray, i);
|
|
750
|
-
val.selected = true;
|
|
751
|
-
setRefresh(refresh + 1);
|
|
752
|
-
}}
|
|
753
|
-
style={{
|
|
754
|
-
borderBottomWidth: 5,
|
|
755
|
-
borderColor: (val.selected) ? Global.AppTheme.primary_color : 'white',
|
|
756
|
-
width: '50%',
|
|
757
|
-
height: normalize(20),
|
|
758
|
-
justifyContent: 'center',
|
|
759
|
-
alignItems: 'center',
|
|
760
|
-
paddingHorizontal: normalize(20),
|
|
761
|
-
backgroundColor: (val.selected) ? '#eaedf9' : 'white',
|
|
762
|
-
}}>
|
|
763
|
-
<Text adjustsFontSizeToFit numberOfLines={1} style={{
|
|
764
|
-
borderWidth: 0,
|
|
765
|
-
fontSize: normalize(10),
|
|
766
|
-
}}>{val.name}</Text>
|
|
767
|
-
</TouchableOpacity>
|
|
768
|
-
);
|
|
769
|
-
})}
|
|
770
|
-
</View>
|
|
771
|
-
{blockData.item.cardbottomviewloading ?
|
|
772
|
-
<View style={{ justifyContent: 'center', alignItems: 'center', width: '100%', height: normalize(50), borderWidth: 0 }}>
|
|
773
|
-
<LoaderLocal
|
|
774
|
-
/>
|
|
775
|
-
</View>
|
|
776
|
-
: null}
|
|
777
|
-
<View style={{ height: normalize(100), flex: 1 }}>
|
|
778
|
-
{isNU(blockData.item.cardbottomviewdata) ?
|
|
779
|
-
blockData.item.cardbottomarray[0].selected && blockData.item.cardbottomviewdata.admissiondetails ?
|
|
780
|
-
renderAdmissionConsultationlist(blockData.item.cardbottomviewdata.admissiondetails, blockData, 'IP')
|
|
781
|
-
:
|
|
782
|
-
blockData.item.cardbottomarray[1].selected && blockData.item.cardbottomviewdata.consultationdetails ?
|
|
783
|
-
renderAdmissionConsultationlist(blockData.item.cardbottomviewdata.consultationdetails, blockData, 'OP')
|
|
784
|
-
: null
|
|
785
|
-
: null}
|
|
786
|
-
</View>
|
|
787
|
-
</View>
|
|
788
|
-
</View>
|
|
789
|
-
</View>
|
|
790
|
-
: null
|
|
791
|
-
}
|
|
792
|
-
</>
|
|
793
|
-
);
|
|
794
|
-
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
const getItemLayout = useCallback(
|
|
798
|
-
(data, index) => ({
|
|
799
|
-
length: 100,
|
|
800
|
-
offset: 100 * index,
|
|
801
|
-
index,
|
|
802
|
-
}),
|
|
803
|
-
[]);
|
|
804
|
-
|
|
805
|
-
return (
|
|
806
|
-
<>
|
|
807
|
-
<View>
|
|
808
|
-
<FlatList
|
|
809
|
-
nestedScrollEnabled={true}
|
|
810
|
-
ref={listRef}
|
|
811
|
-
data={newData}
|
|
812
|
-
initialNumToRender={6}
|
|
813
|
-
maxToRenderPerBatch={10}
|
|
814
|
-
keyExtractor={keyExtractor}
|
|
815
|
-
listKey={keyExtractor}
|
|
816
|
-
getItemLayout={getItemLayout}
|
|
817
|
-
renderItem={renderCardNew}
|
|
818
|
-
ListHeaderComponent={
|
|
819
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
820
|
-
{ValueCheck(newData.length) && !ValueCheck(props.disableTouch) && props.consultationmode ?
|
|
821
|
-
<View style={{ borderWidth: 0.5, minWidth: normalize(35), padding: normalize(2), alignItems: 'center', justifyContent: 'center', borderRadius: normalize(100), margin: normalize(4) }}>
|
|
822
|
-
<Text style={{ fontSize: normalize(14), fontWeight: 'bold' }}>{newData.length}</Text>
|
|
823
|
-
</View>
|
|
824
|
-
: null}
|
|
825
|
-
{isNUQZ(Global.userData.consultationstatus) && ValueCheck(newData.length) && !ValueCheck(props.disableTouch) && props.consultationmode ?
|
|
826
|
-
<ABlink>
|
|
827
|
-
<View
|
|
828
|
-
style={{
|
|
829
|
-
flexDirection: 'row',
|
|
830
|
-
justifyContent: 'center',
|
|
831
|
-
alignItems: 'center',
|
|
832
|
-
}}>
|
|
833
|
-
<Icons.FontAwesome5 name={'user-md'} size={normalize(10)} color={Global.AppTheme.primary_color} style={{ marginHorizontal: normalize(5) }} />
|
|
834
|
-
<Text style={{ color: 'black', fontSize: normalize(9), fontWeight: 'bold' }}>{Global.userData.consultationstatus == 1 ? ' CONSULTATION STARTED ' : Global.userData.consultationstatus == 2 ? ' CONSULTATION PAUSED ' : Global.userData.consultationstatus == 3 ? ' CONSULTATION RESUMED ' : Global.userData.consultationstatus == 4 ? ' CONSULTATION COMPLETED ' : ''}</Text>
|
|
835
|
-
</View>
|
|
836
|
-
</ABlink>
|
|
837
|
-
: null}
|
|
838
|
-
</View>
|
|
839
|
-
}
|
|
840
|
-
ListFooterComponent={
|
|
841
|
-
newData != undefined && newData.length > 7 && props.noscroll == undefined && !props.noscroll ?
|
|
842
|
-
<View style={{
|
|
843
|
-
alignSelf: 'flex-end', marginRight: normalize(20),
|
|
844
|
-
paddingHorizontal: normalize(10),
|
|
845
|
-
}}>
|
|
846
|
-
<CVectorIcon
|
|
847
|
-
data={{
|
|
848
|
-
'displaytext': 'Top',
|
|
849
|
-
'fontcolor': 'black',
|
|
850
|
-
'size': 8,
|
|
851
|
-
'iconname': 'arrow-up',
|
|
852
|
-
'iconcolor': '#f28585',
|
|
853
|
-
'selected': false,
|
|
854
|
-
'visibility': true,
|
|
855
|
-
'iconsize': 20,
|
|
856
|
-
'functionid': 'UL01',
|
|
857
|
-
}}
|
|
858
|
-
callBack={val => val == undefined ? null : moveToTop(val)}
|
|
859
|
-
/>
|
|
860
|
-
</View> : null}
|
|
861
|
-
|
|
862
|
-
/>
|
|
863
|
-
</View>
|
|
864
|
-
|
|
865
|
-
{overlay ?
|
|
866
|
-
<HOverlay
|
|
867
|
-
component={'ConsultationPreview'}
|
|
868
|
-
visibility={val => (val == undefined ? null : setOverlay(val))}
|
|
869
|
-
/>
|
|
870
|
-
: null}
|
|
871
|
-
{isLoading || activity ? <Loader displaytext={true} /> : null}
|
|
872
|
-
</>
|
|
873
|
-
);
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
function CCard(props) {
|
|
877
|
-
return GetCard(props);
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
export default memo(CCard);
|