@jescon-technologies/react-native-ui-kit 0.0.3 → 0.0.5
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 +66 -0
- package/index.js +0 -4
- package/package.json +3 -34
- package/src/Alerts/AAlert.js +3 -3
- package/src/Alerts/AAlertIOS.js +3 -3
- package/src/{common → Common}/NetworkServiceCall.js +1 -1
- package/src/CommonStyle/CommonTheme.js +11 -0
- package/src/CommonStyle/ComponentFunctions.js +632 -0
- package/src/CommonStyle/PopupStyle.js +146 -0
- package/src/CommonStyle/commonStyle.js +93 -0
- package/src/CommonStyle/componentStyle.js +545 -0
- package/src/CommonStyle/optionListStyles.js +175 -0
- package/src/Components/ByProductPage.js +200 -0
- package/src/Components/CDropDownListNew.js +153 -0
- package/src/Components/CSupplierList.js +88 -0
- package/src/Components/CVerificationCard.js +2822 -0
- package/src/Components/CustomButton.js +67 -0
- package/src/Components/CustomCard.js +127 -0
- package/src/Components/CustomTextInput.js +47 -0
- package/src/Components/EquipmentPage.js +313 -0
- package/src/Components/FilterInput.Copy.js +723 -0
- package/src/Components/FilterInput.js +569 -0
- package/src/Components/HSubHeading.js +68 -0
- package/src/Components/HeaderCard.js +40 -0
- package/src/Components/MoreOptionsScreen.js +251 -0
- package/src/Components/NonSwipableProductCard.js +226 -0
- package/src/Components/NonSwipableSupplierCard.js +348 -0
- package/src/Components/ProductCard.js +1336 -0
- package/src/Components/QualityProductCard.js +1059 -0
- package/src/Components/RateProductCard.js +1452 -0
- package/src/Components/RawMaterial.js +261 -0
- package/src/Components/SDropDownEdited.js +549 -0
- package/src/Components/SDropDownNew.js +529 -0
- package/src/Components/SHelpDescription.js +147 -0
- package/src/Components/STextInputNew.js +510 -0
- package/src/Components/SearchProductCard.js +470 -0
- package/src/Components/StageByProduct.js +199 -0
- package/src/Components/SupplierCard.js +243 -0
- package/src/Components/SupplierInvoiceCard.js +405 -0
- package/src/Components/SwipableSupplierCard.js +136 -0
- package/src/Components/TagTemplate.js +74 -0
- package/src/Components/WrappedComponent.js +25 -0
- package/src/Custom/CBooking.js +944 -0
- package/src/Custom/CBookingPostpone.js +1822 -0
- package/src/Custom/CCalendar.js +560 -0
- package/src/Custom/CCard.js +880 -0
- package/src/Custom/CDetailCard.js +205 -0
- package/src/Custom/CHelpImage.js +52 -0
- package/src/Custom/CReport.js +569 -0
- package/src/Custom/CScrollView.js +73 -0
- package/src/Custom/CSignature.js +112 -0
- package/src/Custom/CSliderMenu.js +339 -0
- package/src/Custom/CSupplierCard.js +99 -0
- package/src/Custom/CTemplateCard.js +438 -0
- package/src/Custom/CTokenAllocation.js +1402 -0
- package/src/Custom/CTokenListOverlay.js +122 -0
- package/src/Custom/CWardStatus.js +444 -0
- package/src/Custom/Charts/CBarChart.js +218 -0
- package/src/Custom/Charts/CDashBoardList.js +133 -0
- package/src/Custom/Charts/CDashBoardTable.js +172 -0
- package/src/Custom/Charts/CLineChart.js +193 -0
- package/src/Custom/Charts/CPieChart.js +186 -0
- package/src/Custom/Loader.js +182 -0
- package/src/Custom/OUserView.js +1121 -0
- package/src/Custom/PreviewDosage.js +115 -0
- package/src/Custom/SearchLoader.js +32 -0
- package/src/Custom/TableComponent/CActivityTable.js +707 -0
- package/src/Custom/TableComponent/CMoreButtonTable.js +197 -0
- package/src/Custom/TableComponent/CTable.js +185 -0
- package/src/Custom/TableComponent/CTextBody.js +40 -0
- package/src/Custom/TableComponent/CTextHeader.js +17 -0
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +1011 -0
- package/src/Custom/TableComponent/SDropdownTable.js +491 -0
- package/src/Custom/TableComponent/TagTable.js +1200 -0
- package/src/CustomComponents/CAddColumn.js +140 -0
- package/src/CustomComponents/CAssessmentDelete.js +307 -0
- package/src/CustomComponents/CAwesomeButton.js +83 -0
- package/src/CustomComponents/CAwesomeMoreButton.js +54 -0
- package/src/CustomComponents/CBackHandler.js +273 -0
- package/src/CustomComponents/CCalendar.js +243 -0
- package/src/CustomComponents/CCommentOverlay.js +202 -0
- package/src/CustomComponents/CComments.js +162 -0
- package/src/CustomComponents/CContainerView.js +24 -0
- package/src/CustomComponents/CCustomTextInput.js +336 -0
- package/src/CustomComponents/CDetailView.js +40 -0
- package/src/CustomComponents/CDropDownList.js +153 -0
- package/src/CustomComponents/CDropdownSelect.js +555 -0
- package/src/CustomComponents/CFooterView.js +42 -0
- package/src/CustomComponents/CImagePickerSave.js +316 -0
- package/src/CustomComponents/CModalOverlay.js +91 -0
- package/src/CustomComponents/CNetworkStatus.js +327 -0
- package/src/CustomComponents/CNotesInstructions.js +1000 -0
- package/src/CustomComponents/COverlay.js +81 -0
- package/src/CustomComponents/CRemarks.js +176 -0
- package/src/CustomComponents/CRowAdd.js +143 -0
- package/src/CustomComponents/CSummaryDropDown.js +327 -0
- package/src/CustomComponents/CText.js +9 -0
- package/src/CustomComponents/CVectorIcon.js +34 -0
- package/src/CustomComponents/HtmlContentViewer.js +65 -0
- package/src/CustomComponents/PdfContentViewer.js +90 -0
- package/src/CustomComponents/SDropDownDosage.js +1087 -0
- package/src/CustomComponents/SwipableProductCard.js +246 -0
- package/src/CustomComponents/SwipableProductImageCard.js +254 -0
- package/src/CustomComponents/WorkOrderDetails.js +1216 -0
- package/src/CustomComponents/WorkOrderDetailsPage.js +1213 -0
- package/src/HOC/ConfirmOverlay.js +2 -2
- package/src/HOC/HMoreButton.js +1 -1
- package/src/HOC/HNatureHeading.js +1 -1
- package/src/HOC/HShadowButton.js +1 -1
- package/src/HOC/HShadowCountButton.js +1 -1
- package/src/Json/Chart.json +818 -0
- package/src/Json/Consultation.json +622 -0
- package/src/Json/CreditBill.json +490 -0
- package/src/Json/Dropdown.json +216 -0
- package/src/Json/DropdownConsultation.json +228 -0
- package/src/Json/DynamicReports.json +623 -0
- package/src/Json/Footer.json +79 -0
- package/src/Media/AudioScreen.js +2 -7
- package/src/Media/CCaptureImageWithoutEdit.js +1 -1
- package/src/Media/CImageGallery.js +2 -2
- package/src/Media/CSingleImage.js +2 -2
- package/src/Media/CVideoPlay.js +1 -1
- package/src/Media/DocumentScreen.js +2 -7
- package/src/Media/DrawingScreen.js +2 -6
- package/src/Media/ImageScreen.js +2 -6
- package/src/Media/VideoScreen.js +2 -7
- package/src/Navigation/PageNavigation.js +224 -0
- package/src/Navigation/useFocusEffect.js +2 -0
- package/src/Navigation/useFocusEffect.native.js +1 -0
- package/src/Navigation/useFocusEffect.web.js +1 -0
- package/src/Navigation/useIsFocused.js +1 -0
- package/src/Navigation/useIsFocused.native.js +1 -0
- package/src/Navigation/useIsFocused.web.js +1 -0
- package/src/Navigation/useNavigation.js +2 -0
- package/src/Navigation/useNavigation.native.js +1 -0
- package/src/Navigation/useNavigation.web.js +1 -0
- package/src/Screens/CMedications.js +528 -0
- package/src/Screens/CWebViewGallery.js +203 -0
- package/src/Screens/ChartScan.js +279 -0
- package/src/Screens/ChartScreenNew.js +1579 -0
- package/src/Screens/Consultation.js +1500 -0
- package/src/Screens/Dashboard.js +778 -0
- package/src/Screens/FileExplorer.js +288 -0
- package/src/Screens/Footer.js +340 -0
- package/src/Screens/ForgotPassword.js +288 -0
- package/src/Screens/HeaderBlock.js +353 -0
- package/src/Screens/Login.js +328 -0
- package/src/Screens/Notification.js +149 -0
- package/src/Screens/OcrScreen.js +20 -0
- package/src/Screens/PdfPreview.js +507 -0
- package/src/Screens/RegistrationDetails.js +467 -0
- package/src/Screens/SearchScreen.js +582 -0
- package/src/Screens/Splash.js +788 -0
- package/src/Screens/SwipeLeftView.js +1867 -0
- package/src/StaticComponents/SDatePickerLabel.js +1 -1
- package/src/StaticComponents/SDatePickerNew.js +1 -1
- package/src/StaticComponents/SDateTimePickerNew.js +2 -2
- package/src/StaticComponents/SDropDownGenerate.js +3 -3
- package/src/StaticComponents/SDropDownHoc.js +4 -4
- package/src/StaticComponents/SDropDownIcon.js +1 -1
- package/src/StaticComponents/SMenuBox.js +2 -2
- package/src/StaticComponents/SSearch.js +2 -2
- package/src/StaticComponents/STextInput.js +1 -1
- package/src/StaticComponents/STimePicker.js +1 -1
- package/src/StaticComponents/STimingDropDownNew.js +2 -6
- package/src/StaticComponents/STimingSwitch.js +1 -1
- package/src/layout/CContainerView.js +1 -1
- package/src/layout/CDetailView.js +3 -3
- package/src/layout/HeaderBlock.js +5 -5
- package/src/layout/INVLoginLayout.js +3 -4
- package/src/layout/Loader.js +2 -2
- package/src/HOC/HAbsolute.js +0 -56
- package/src/HOC/HDiscontinue.js +0 -105
- package/src/HOC/HOverlay.js +0 -99
- package/src/layout/FooterBlock.js +0 -821
- /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
- /package/src/{common → Common}/Icons.js +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
TouchableOpacity,
|
|
4
|
+
View,
|
|
5
|
+
Text,
|
|
6
|
+
Image,
|
|
7
|
+
FlatList,
|
|
8
|
+
Dimensions,
|
|
9
|
+
PanResponder
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import Carousel, { Pagination } from 'react-native-snap-carousel';
|
|
12
|
+
import ImageZoom from 'react-native-image-pan-zoom';
|
|
13
|
+
|
|
14
|
+
import { normalize } from '../CommonStyle/ComponentFunctions';
|
|
15
|
+
import { Global } from '../../../../../src/Common/Global';
|
|
16
|
+
import HOCIcons from '../HOC/HOCIcons';
|
|
17
|
+
import { isBNUL, isNU, isNUQ } from '../CommonStyle/ComponentFunctions';
|
|
18
|
+
import Loader from '../Custom/Loader';
|
|
19
|
+
import HeaderBlock from './HeaderBlock';
|
|
20
|
+
import WebView from 'react-native-webview';
|
|
21
|
+
import CDetailView from '../CustomComponents/CDetailView';
|
|
22
|
+
import CContainerView from '../CustomComponents/CContainerView';
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export default function CWebViewGallery(props) {
|
|
26
|
+
|
|
27
|
+
const flatListRef = useRef();
|
|
28
|
+
const [images, setImages] = useState(props.route.params.displayarray);
|
|
29
|
+
const [indexSelected, setIndexSelected] = useState(0);
|
|
30
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
31
|
+
const [refresh, setRefresh] = useState(0);
|
|
32
|
+
|
|
33
|
+
function getCurrentData(array, count) {
|
|
34
|
+
|
|
35
|
+
console.log('getCurrentData', JSON.stringify(array));
|
|
36
|
+
|
|
37
|
+
let prevcodearray = isBNUL(array) ? array.filter((i, k) => { return k == count ? { ...i } : undefined }) : [];
|
|
38
|
+
let prevcode = isBNUL(prevcodearray) && isNU(prevcodearray[0]) ? prevcodearray[0] : {};
|
|
39
|
+
return prevcode;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
|
|
44
|
+
<CContainerView>
|
|
45
|
+
|
|
46
|
+
<View style={{ flex: 1 }}>
|
|
47
|
+
<HeaderBlock
|
|
48
|
+
style={{ marginBottom: normalize(25) }}
|
|
49
|
+
|
|
50
|
+
/>
|
|
51
|
+
<CDetailView>
|
|
52
|
+
<View style={{ flex: 1, backgroundColor: 'white' }}>
|
|
53
|
+
{isLoading ?
|
|
54
|
+
<Loader
|
|
55
|
+
displaytext={true}
|
|
56
|
+
/>
|
|
57
|
+
: null}
|
|
58
|
+
<View style={{ flex: 1, justifyContent: 'center' }}
|
|
59
|
+
// {...panResponder.panHandlers}
|
|
60
|
+
>
|
|
61
|
+
{isBNUL(images) && isNU(getCurrentData(images, indexSelected).filelink) ?
|
|
62
|
+
// <Pdf
|
|
63
|
+
// onLoadProgress={(n) => { }}
|
|
64
|
+
// trustAllCerts={false}
|
|
65
|
+
// onPressLink={(uri) => { }}
|
|
66
|
+
// onPageChanged={(page, numberOfPages) => { }}
|
|
67
|
+
// style={{ flex: 1, backgroundColor: 'white' }}
|
|
68
|
+
// source={{ uri: getCurrentData(images, indexSelected).filelink }}
|
|
69
|
+
// onLoadComplete={(numberOfPages, filePath) => {
|
|
70
|
+
// setIsLoading(false);
|
|
71
|
+
// }}
|
|
72
|
+
// onError={(error) => {
|
|
73
|
+
// setIsLoading(false);
|
|
74
|
+
// }}
|
|
75
|
+
// />
|
|
76
|
+
<WebView
|
|
77
|
+
source={{ html: isNUQ(getCurrentData(images, indexSelected).filelink) ? getCurrentData(images, indexSelected).filelink : `` }}
|
|
78
|
+
// style={{ height: Dimensions.get('screen').height * 0.42 }}
|
|
79
|
+
scalesPageToFit={false}
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
: null}
|
|
83
|
+
{isBNUL(images) && (indexSelected != 0) ?
|
|
84
|
+
<TouchableOpacity
|
|
85
|
+
onPress={() => {
|
|
86
|
+
setIndexSelected(indexSelected - 1);
|
|
87
|
+
flatListRef.current.scrollToIndex({ index: indexSelected - 1 });
|
|
88
|
+
}}
|
|
89
|
+
style={{ opacity: 1, position: 'absolute', left: 0, backgroundColor: 'white', justifyContent: 'center', alignItems: 'center', borderTopRightRadius: 5, borderBottomRightRadius: 5, elevation: 2, borderWidth: 0.5, borderColor: 'grey' }}>
|
|
90
|
+
<HOCIcons.Icons
|
|
91
|
+
icongroup={4}
|
|
92
|
+
name={'angle-double-left'}
|
|
93
|
+
color={Global.AppTheme.primary_color}
|
|
94
|
+
size={normalize(20)}
|
|
95
|
+
style={{
|
|
96
|
+
textAlign: 'center',
|
|
97
|
+
margin: normalize(5),
|
|
98
|
+
marginVertical: normalize(10)
|
|
99
|
+
}}
|
|
100
|
+
/>
|
|
101
|
+
</TouchableOpacity>
|
|
102
|
+
: null}
|
|
103
|
+
{isBNUL(images) && (images.length != (indexSelected + 1)) ?
|
|
104
|
+
<TouchableOpacity
|
|
105
|
+
onPress={() => {
|
|
106
|
+
setIndexSelected(indexSelected + 1);
|
|
107
|
+
flatListRef.current.scrollToIndex({ index: indexSelected + 1 });
|
|
108
|
+
}}
|
|
109
|
+
style={{ opacity: 1, position: 'absolute', right: 0, backgroundColor: 'white', justifyContent: 'center', alignItems: 'center', borderTopLeftRadius: 5, borderBottomLeftRadius: 5, elevation: 2, borderWidth: 0.5, borderColor: 'grey' }}>
|
|
110
|
+
<HOCIcons.Icons
|
|
111
|
+
icongroup={4}
|
|
112
|
+
name={'angle-double-right'}
|
|
113
|
+
color={Global.AppTheme.primary_color}
|
|
114
|
+
size={normalize(20)}
|
|
115
|
+
style={{
|
|
116
|
+
textAlign: 'center',
|
|
117
|
+
margin: normalize(5),
|
|
118
|
+
marginVertical: normalize(10)
|
|
119
|
+
}}
|
|
120
|
+
/>
|
|
121
|
+
</TouchableOpacity>
|
|
122
|
+
: null}
|
|
123
|
+
</View>
|
|
124
|
+
<View
|
|
125
|
+
style={{
|
|
126
|
+
marginTop: 20,
|
|
127
|
+
paddingHorizontal: 32,
|
|
128
|
+
alignSelf: 'flex-end',
|
|
129
|
+
}}
|
|
130
|
+
>
|
|
131
|
+
<Text style={{ color: 'black', fontSize: normalize(25), fontWeight: 'bold' }}>
|
|
132
|
+
{indexSelected + 1}/{isBNUL(images) ? images.length : 0}
|
|
133
|
+
</Text>
|
|
134
|
+
</View>
|
|
135
|
+
{isBNUL(images) ?
|
|
136
|
+
<View style={{ alignItems: 'center' }}>
|
|
137
|
+
<FlatList
|
|
138
|
+
ref={flatListRef}
|
|
139
|
+
initialNumToRender={50}
|
|
140
|
+
maxToRenderPerBatch={50}
|
|
141
|
+
horizontal={true}
|
|
142
|
+
data={images}
|
|
143
|
+
style={{ position: 'absolute', bottom: normalize(30) }}
|
|
144
|
+
showsHorizontalScrollIndicator={false}
|
|
145
|
+
contentContainerStyle={{
|
|
146
|
+
alignItems: 'center'
|
|
147
|
+
}}
|
|
148
|
+
keyExtractor={(item, index) => 'key' + index}
|
|
149
|
+
renderItem={({ item, index }) => {
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<TouchableOpacity
|
|
153
|
+
onPress={() => {
|
|
154
|
+
if (index == indexSelected) {
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
// setIsLoading(true);
|
|
158
|
+
setIndexSelected(index)
|
|
159
|
+
}
|
|
160
|
+
}}
|
|
161
|
+
activeOpacity={0.3}
|
|
162
|
+
style={{
|
|
163
|
+
elevation: 5,
|
|
164
|
+
margin: normalize(5),
|
|
165
|
+
marginVertical: normalize(10),
|
|
166
|
+
borderRadius: 16,
|
|
167
|
+
borderWidth: index === indexSelected ? 1 : 0.5,
|
|
168
|
+
borderColor: index === indexSelected ? Global.AppTheme.primary_color : 'grey',
|
|
169
|
+
justifyContent: 'center',
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
padding: normalize(5),
|
|
172
|
+
backgroundColor: index === indexSelected ? '#e8ecff' : 'white'
|
|
173
|
+
}}
|
|
174
|
+
>
|
|
175
|
+
<HOCIcons.Icons
|
|
176
|
+
icongroup={4}
|
|
177
|
+
name={'file-text'}
|
|
178
|
+
color={index === indexSelected ? Global.AppTheme.primary_color : 'lightgrey'}
|
|
179
|
+
size={normalize(30)}
|
|
180
|
+
style={{ textAlign: 'center', margin: normalize(5) }}
|
|
181
|
+
/>
|
|
182
|
+
{isNUQ(item.filename) ?
|
|
183
|
+
<Text adjustsFontSizeToFit style={{
|
|
184
|
+
color: index === indexSelected ? Global.AppTheme.primary_color : 'grey',
|
|
185
|
+
fontSize: normalize(10),
|
|
186
|
+
fontWeight: index === indexSelected ? 'bold' : 'normal',
|
|
187
|
+
paddingHorizontal: normalize(5)
|
|
188
|
+
}}>{isNUQ(item.filename) ? item.filename : null}</Text>
|
|
189
|
+
: null}
|
|
190
|
+
</TouchableOpacity>
|
|
191
|
+
)
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
194
|
+
</View>
|
|
195
|
+
: null}
|
|
196
|
+
</View>
|
|
197
|
+
</CDetailView>
|
|
198
|
+
</View>
|
|
199
|
+
</CContainerView>
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
}
|
|
203
|
+
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Text, View, ScrollView, StyleSheet, Dimensions, TextInput, TouchableOpacity, Image, ActivityIndicator } from 'react-native';
|
|
4
|
+
import { useNavigation } from '@react-navigation/native';
|
|
5
|
+
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
|
6
|
+
import NetworkServiceCall from '../Common/NetworkServiceCall';
|
|
7
|
+
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
8
|
+
import { Flag } from '../Json/Dropdown.json'
|
|
9
|
+
import SDropDownNew from '../StaticComponents/SDatePickerNew';
|
|
10
|
+
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
11
|
+
import SDatePicker from '../StaticComponents/SDatePickerNew';
|
|
12
|
+
import { getLoading, isNU, notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
13
|
+
import HHeading from '../HOC/HHeading';
|
|
14
|
+
import CCard from '../Custom/CCard';
|
|
15
|
+
import { Global } from '../../../../../src/Common/Global';
|
|
16
|
+
import Loader from '../Custom/Loader';
|
|
17
|
+
|
|
18
|
+
const ChartScan = (props) => {
|
|
19
|
+
const [data, setData] = useState()
|
|
20
|
+
const navigation = useNavigation();
|
|
21
|
+
const [searchWord, setSearchWord] = useState("")
|
|
22
|
+
const [isLoading, setIsLoading] = useState(false)
|
|
23
|
+
const [refresh, setRefresh] = useState(0)
|
|
24
|
+
const [filter, setFilter] = useState('Patient ID');
|
|
25
|
+
|
|
26
|
+
const [dropdownvalue, setDropdownvalue] = useState(2)
|
|
27
|
+
var x = new Date()
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
getPatientData(x, 0)
|
|
31
|
+
getDate()
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
34
|
+
const onDetectBarcode = async (item) => {
|
|
35
|
+
navigation.navigate('CCaptureImageWithoutEdit', {
|
|
36
|
+
'cameramoduletype': 2, // barcode
|
|
37
|
+
'hidebuttons': true,
|
|
38
|
+
'cameratype': 'back',
|
|
39
|
+
onSelect: (s) => s && isNU(s) ? onDetectVisionCameraBarcode(s) : null
|
|
40
|
+
})
|
|
41
|
+
// setSearchWord(item.data)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function onDetectVisionCameraBarcode(params) {
|
|
45
|
+
setSearchWord(params.data)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getDate(params) {
|
|
49
|
+
let today = new Date(params);
|
|
50
|
+
let yyyy = today.getFullYear();
|
|
51
|
+
let mm = today.getMonth() + 1; // Months start at 0!
|
|
52
|
+
let dd = today.getDate();
|
|
53
|
+
|
|
54
|
+
if (dd < 10) dd = '0' + dd;
|
|
55
|
+
if (mm < 10) mm = '0' + mm;
|
|
56
|
+
|
|
57
|
+
today = yyyy + '-' + mm + '-' + dd;
|
|
58
|
+
return today
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function reverse(s) {
|
|
62
|
+
return s != undefined ? s.split("-").reverse().join("-") : ''
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function getPatientData(day, pid) {
|
|
66
|
+
setData()
|
|
67
|
+
setSearchWord('')
|
|
68
|
+
setIsLoading(true)
|
|
69
|
+
let date = getDate(day)
|
|
70
|
+
console.log("YYYYYRRRRRRRTTTTTTTTTTWWWWWWWWWWW", date)
|
|
71
|
+
let buttonapi = APIURL + 'insuranceadvanceget/emrcommonget/rnlaconsultationpatientchartscan ' + pid + "," + "'" + date + "'" + "," + Global.userData.suuser;
|
|
72
|
+
console.log("BUTTTTTOOONNNN APIIIIIIIIIIIIIIII", buttonapi)
|
|
73
|
+
NetworkServiceCall("get", buttonapi, "")
|
|
74
|
+
.then(function (response) {
|
|
75
|
+
if (response.httpstatus == 200 && response.data != null && response.data != undefined &&
|
|
76
|
+
response.data.datalist != undefined && response.data.datalist != null) {
|
|
77
|
+
// setData([response.data.datalist[56],response.data.datalist[34],response.data.datalist[76]])
|
|
78
|
+
setData((response.data.datalist).filter((value, index, self) =>
|
|
79
|
+
index === self.findIndex((t) => (
|
|
80
|
+
t.hopapatient === value.hopapatient
|
|
81
|
+
))
|
|
82
|
+
))
|
|
83
|
+
// setData(response.data.datalist)
|
|
84
|
+
setRefresh(refresh + 1)
|
|
85
|
+
setIsLoading(false)
|
|
86
|
+
// console.log("DATAAAAAAAAAAAA",JSON.stringify(response))
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
// setIsLoading(false)
|
|
90
|
+
setData([])
|
|
91
|
+
setIsLoading(false)
|
|
92
|
+
notifyMessage("No Patients", 4)
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
getLoading(v => setIsLoading(false))
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<View style={{ marginBottom: normalize(50), marginTop: normalize(-3) }}>
|
|
100
|
+
|
|
101
|
+
{isLoading ?
|
|
102
|
+
<Loader displaytext={true} /> : null}
|
|
103
|
+
<View>
|
|
104
|
+
<View style={{ width: '100%', }}>
|
|
105
|
+
<HHeading
|
|
106
|
+
styles={{
|
|
107
|
+
"icongroup": 3,
|
|
108
|
+
"iconname": 'scanner',
|
|
109
|
+
"bgcolor": "#f2efef",
|
|
110
|
+
"iconsize": 16,
|
|
111
|
+
"iconcolor": "darkblue",
|
|
112
|
+
"displaytext": 'Chart Scan',
|
|
113
|
+
"textsize": 15,
|
|
114
|
+
"textcolor": "darkblue"
|
|
115
|
+
}}
|
|
116
|
+
callBack={val => (val == undefined ? null : console.log(val))}>
|
|
117
|
+
{data != undefined && data.length > 0 ?
|
|
118
|
+
<Text style={{ borderWidth: 1, padding: normalize(3), borderRadius: 10, textAlign: 'center' }}>{data.length}</Text> : null}
|
|
119
|
+
</HHeading>
|
|
120
|
+
</View>
|
|
121
|
+
|
|
122
|
+
<SSearch
|
|
123
|
+
editable={true}
|
|
124
|
+
dropdownapi={'insuranceadvanceget/emrcommonget/rnlasearchdropdown 1'}
|
|
125
|
+
value={searchWord}
|
|
126
|
+
dropdownarray={[
|
|
127
|
+
{
|
|
128
|
+
"datavalue": 4,
|
|
129
|
+
"iconname": "mobile",
|
|
130
|
+
"displayvalue": "MOBILE NO.",
|
|
131
|
+
"searchparam": "mobileno",
|
|
132
|
+
"selected": false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"datavalue": 6,
|
|
136
|
+
"iconname": "circle",
|
|
137
|
+
"displayvalue": "TOKEN NO.",
|
|
138
|
+
"searchparam": "badgenumber",
|
|
139
|
+
"selected": false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"datavalue": 1,
|
|
143
|
+
"iconname": "bed",
|
|
144
|
+
"displayvalue": "BED NO.",
|
|
145
|
+
"searchparam": "badgenumber",
|
|
146
|
+
"selected": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"datavalue": 3,
|
|
150
|
+
"iconname": "location-arrow",
|
|
151
|
+
"displayvalue": "PLACE",
|
|
152
|
+
"searchparam": "place",
|
|
153
|
+
"selected": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"datavalue": 5,
|
|
157
|
+
"iconname": "th-list",
|
|
158
|
+
"displayvalue": "CLINIC",
|
|
159
|
+
"searchparam": "clinicalunit",
|
|
160
|
+
"selected": false
|
|
161
|
+
}]}
|
|
162
|
+
onChangeText={text => setSearchWord(text)}
|
|
163
|
+
onChangeData={val => val == undefined ? null : setFilter(val.searchparam)}
|
|
164
|
+
onBarCodeScan={val => val == undefined ? null : FnNavigate()}
|
|
165
|
+
onSearch={val => val == undefined ? null : getPatientData(x, searchWord)} />
|
|
166
|
+
|
|
167
|
+
<View style={{ width: '50%', alignSelf: 'flex-end' }}>
|
|
168
|
+
<SDatePicker
|
|
169
|
+
passingDate={
|
|
170
|
+
new Date()
|
|
171
|
+
}
|
|
172
|
+
onChangeData={val =>
|
|
173
|
+
val == undefined
|
|
174
|
+
? null
|
|
175
|
+
: getPatientData(getDate(val), 0)
|
|
176
|
+
}
|
|
177
|
+
keycode={1}
|
|
178
|
+
format={"DD-MM-YYYY"}
|
|
179
|
+
refreshCount={val =>
|
|
180
|
+
val == undefined
|
|
181
|
+
? null
|
|
182
|
+
: setRefresh(refresh + val)
|
|
183
|
+
}
|
|
184
|
+
/>
|
|
185
|
+
</View>
|
|
186
|
+
|
|
187
|
+
{/* <View style={{ width: '100%', flexDirection: 'row', justifyContent: 'space-evenly', paddingHorizontal: 5 }}>
|
|
188
|
+
<View
|
|
189
|
+
style={[ComponentStyles.searchTextbox_View,
|
|
190
|
+
styles.overlay_searchTextbox_View, { height: normalize(32) }]} >
|
|
191
|
+
<View style={styles.textinput_view}>
|
|
192
|
+
<TextInput
|
|
193
|
+
style={[ComponentStyles.searchTextbox]}
|
|
194
|
+
editable={true}
|
|
195
|
+
autoFocus={true}
|
|
196
|
+
keyboardType='default'
|
|
197
|
+
placeholder={dropdownvalue == 1 ? "Mobile No" : "Patient ID"}
|
|
198
|
+
placeholderTextColor={'lightblue'}
|
|
199
|
+
onChangeText={text => setSearchWord(text)}
|
|
200
|
+
value={searchWord}
|
|
201
|
+
/>
|
|
202
|
+
</View>
|
|
203
|
+
<View style={styles.barcode_icon_view}>
|
|
204
|
+
<TouchableOpacity style={styles.barcode_icon_inner_view}
|
|
205
|
+
onPress={() => FnNavigate()}>
|
|
206
|
+
<Image style={styles.barcode_icon}
|
|
207
|
+
source={require("../Asset/Icons/barcode2.png")}
|
|
208
|
+
/>
|
|
209
|
+
</TouchableOpacity>
|
|
210
|
+
</View>
|
|
211
|
+
</View>
|
|
212
|
+
|
|
213
|
+
<TouchableOpacity style={{}}
|
|
214
|
+
onPress={() => getPatientData(x, searchWord)}
|
|
215
|
+
>
|
|
216
|
+
<FontAwesome5 name={"search"} color={"black"} size={normalize(25)} />
|
|
217
|
+
</TouchableOpacity>
|
|
218
|
+
</View> */}
|
|
219
|
+
</View>
|
|
220
|
+
|
|
221
|
+
{data != undefined ?
|
|
222
|
+
<View style={{ paddingHorizontal: normalize(10) }}>
|
|
223
|
+
<CCard
|
|
224
|
+
filter={filter}
|
|
225
|
+
search={searchWord}
|
|
226
|
+
navigation={navigation}
|
|
227
|
+
data={data}
|
|
228
|
+
chartscan={true}
|
|
229
|
+
/>
|
|
230
|
+
</View> : null}
|
|
231
|
+
</View>
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
function FnNavigate() {
|
|
235
|
+
|
|
236
|
+
navigation.navigate('CCaptureImageWithoutEdit', {
|
|
237
|
+
'cameramoduletype': 2, // barcode
|
|
238
|
+
'hidebuttons': true,
|
|
239
|
+
'cameratype': 'back',
|
|
240
|
+
onSelect: (s) => s && isNU(s) ? onDetectVisionCameraBarcode(s) : null
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
// navigation.navigate("BarcodeScan", { onSelect: onDetectBarcode, navigation: navigation })
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
export default ChartScan;
|
|
248
|
+
|
|
249
|
+
const styles = StyleSheet.create({
|
|
250
|
+
search_outer_container: {
|
|
251
|
+
flexDirection: 'row',
|
|
252
|
+
justifyContent: 'space-around',
|
|
253
|
+
alignItems: 'center',
|
|
254
|
+
paddingVertical: '2%',
|
|
255
|
+
width: '100%',
|
|
256
|
+
backgroundColor: 'white',
|
|
257
|
+
elevation: 20,
|
|
258
|
+
shadowColor: '#000',
|
|
259
|
+
shadowOffset: { width: 0, height: 0 },
|
|
260
|
+
shadowOpacity: 0.1,
|
|
261
|
+
shadowRadius: 5,
|
|
262
|
+
},
|
|
263
|
+
overlay_searchTextbox_View: {
|
|
264
|
+
width: '65%', flexDirection: 'row'
|
|
265
|
+
},
|
|
266
|
+
barcode_icon_view: {
|
|
267
|
+
paddingRight: '1%', width: '20%', alignItems: 'flex-end',
|
|
268
|
+
},
|
|
269
|
+
barcode_icon_inner_view: {
|
|
270
|
+
width: '80%', alignItems: 'flex-end',
|
|
271
|
+
|
|
272
|
+
},
|
|
273
|
+
barcode_icon: {
|
|
274
|
+
width: 30, height: 32
|
|
275
|
+
},
|
|
276
|
+
textinput_view: {
|
|
277
|
+
flex: 1, paddingLeft: '1%', width: '80%',
|
|
278
|
+
},
|
|
279
|
+
});
|