@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.
Files changed (205) hide show
  1. package/dist/Common/ErrorBoundary.d.ts +15 -0
  2. package/dist/Common/ErrorBoundary.d.ts.map +1 -0
  3. package/dist/Common/ErrorBoundary.js +64 -0
  4. package/dist/Common/ErrorBoundary.js.map +1 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +8 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/src/Common/ErrorBoundary.d.ts +15 -0
  10. package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
  11. package/dist/src/Common/ErrorBoundary.js +64 -0
  12. package/dist/src/Common/ErrorBoundary.js.map +1 -0
  13. package/package.json +17 -5
  14. package/.gitattributes +0 -2
  15. package/index.d.ts +0 -66
  16. package/index.js +0 -66
  17. package/src/Alerts/AAlert.js +0 -137
  18. package/src/Alerts/AAlertIOS.js +0 -97
  19. package/src/Alerts/ABlink.js +0 -40
  20. package/src/Common/ErrorBoundary.tsx +0 -73
  21. package/src/Common/Icons.js +0 -49
  22. package/src/Common/NetworkServiceCall.js +0 -265
  23. package/src/CommonStyle/CommonTheme.js +0 -11
  24. package/src/CommonStyle/ComponentFunctions.js +0 -632
  25. package/src/CommonStyle/PopupStyle.js +0 -146
  26. package/src/CommonStyle/commonStyle.js +0 -93
  27. package/src/CommonStyle/componentStyle.js +0 -545
  28. package/src/CommonStyle/optionListStyles.js +0 -175
  29. package/src/Components/ByProductPage.js +0 -200
  30. package/src/Components/CDropDownListNew.js +0 -153
  31. package/src/Components/CSupplierList.js +0 -88
  32. package/src/Components/CVerificationCard.js +0 -2822
  33. package/src/Components/CustomButton.js +0 -67
  34. package/src/Components/CustomCard.js +0 -127
  35. package/src/Components/CustomTextInput.js +0 -47
  36. package/src/Components/EquipmentPage.js +0 -313
  37. package/src/Components/FilterInput.Copy.js +0 -723
  38. package/src/Components/FilterInput.js +0 -569
  39. package/src/Components/HSubHeading.js +0 -68
  40. package/src/Components/HeaderCard.js +0 -40
  41. package/src/Components/MoreOptionsScreen.js +0 -251
  42. package/src/Components/NonSwipableProductCard.js +0 -226
  43. package/src/Components/NonSwipableSupplierCard.js +0 -348
  44. package/src/Components/ProductCard.js +0 -1336
  45. package/src/Components/QualityProductCard.js +0 -1059
  46. package/src/Components/RateProductCard.js +0 -1452
  47. package/src/Components/RawMaterial.js +0 -261
  48. package/src/Components/SDropDownEdited.js +0 -549
  49. package/src/Components/SDropDownNew.js +0 -529
  50. package/src/Components/SHelpDescription.js +0 -147
  51. package/src/Components/STextInputNew.js +0 -510
  52. package/src/Components/SearchProductCard.js +0 -470
  53. package/src/Components/StageByProduct.js +0 -199
  54. package/src/Components/SupplierCard.js +0 -243
  55. package/src/Components/SupplierInvoiceCard.js +0 -405
  56. package/src/Components/SwipableSupplierCard.js +0 -136
  57. package/src/Components/TagTemplate.js +0 -74
  58. package/src/Components/WrappedComponent.js +0 -25
  59. package/src/Custom/CBooking.js +0 -944
  60. package/src/Custom/CBookingPostpone.js +0 -1822
  61. package/src/Custom/CCalendar.js +0 -560
  62. package/src/Custom/CCard.js +0 -880
  63. package/src/Custom/CDetailCard.js +0 -205
  64. package/src/Custom/CHelpImage.js +0 -52
  65. package/src/Custom/CReport.js +0 -569
  66. package/src/Custom/CScrollView.js +0 -73
  67. package/src/Custom/CSignature.js +0 -112
  68. package/src/Custom/CSliderMenu.js +0 -339
  69. package/src/Custom/CSupplierCard.js +0 -99
  70. package/src/Custom/CTemplateCard.js +0 -438
  71. package/src/Custom/CTokenAllocation.js +0 -1402
  72. package/src/Custom/CTokenListOverlay.js +0 -122
  73. package/src/Custom/CWardStatus.js +0 -444
  74. package/src/Custom/Charts/CBarChart.js +0 -218
  75. package/src/Custom/Charts/CDashBoardList.js +0 -133
  76. package/src/Custom/Charts/CDashBoardTable.js +0 -172
  77. package/src/Custom/Charts/CLineChart.js +0 -193
  78. package/src/Custom/Charts/CPieChart.js +0 -186
  79. package/src/Custom/Loader.js +0 -182
  80. package/src/Custom/OUserView.js +0 -1121
  81. package/src/Custom/PreviewDosage.js +0 -115
  82. package/src/Custom/SearchLoader.js +0 -32
  83. package/src/Custom/TableComponent/CActivityTable.js +0 -707
  84. package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
  85. package/src/Custom/TableComponent/CTable.js +0 -185
  86. package/src/Custom/TableComponent/CTextBody.js +0 -40
  87. package/src/Custom/TableComponent/CTextHeader.js +0 -17
  88. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
  89. package/src/Custom/TableComponent/SDropdownTable.js +0 -491
  90. package/src/Custom/TableComponent/TagTable.js +0 -1200
  91. package/src/CustomComponents/CAddColumn.js +0 -140
  92. package/src/CustomComponents/CAssessmentDelete.js +0 -307
  93. package/src/CustomComponents/CAwesomeButton.js +0 -83
  94. package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
  95. package/src/CustomComponents/CBackHandler.js +0 -273
  96. package/src/CustomComponents/CCalendar.js +0 -243
  97. package/src/CustomComponents/CCommentOverlay.js +0 -202
  98. package/src/CustomComponents/CComments.js +0 -162
  99. package/src/CustomComponents/CContainerView.js +0 -24
  100. package/src/CustomComponents/CCustomTextInput.js +0 -336
  101. package/src/CustomComponents/CDetailView.js +0 -40
  102. package/src/CustomComponents/CDropDownList.js +0 -153
  103. package/src/CustomComponents/CDropdownSelect.js +0 -555
  104. package/src/CustomComponents/CFooterView.js +0 -42
  105. package/src/CustomComponents/CImagePickerSave.js +0 -316
  106. package/src/CustomComponents/CModalOverlay.js +0 -91
  107. package/src/CustomComponents/CNetworkStatus.js +0 -327
  108. package/src/CustomComponents/CNotesInstructions.js +0 -1000
  109. package/src/CustomComponents/COverlay.js +0 -81
  110. package/src/CustomComponents/CRemarks.js +0 -176
  111. package/src/CustomComponents/CRowAdd.js +0 -143
  112. package/src/CustomComponents/CSummaryDropDown.js +0 -327
  113. package/src/CustomComponents/CText.js +0 -9
  114. package/src/CustomComponents/CVectorIcon.js +0 -34
  115. package/src/CustomComponents/HtmlContentViewer.js +0 -65
  116. package/src/CustomComponents/PdfContentViewer.js +0 -90
  117. package/src/CustomComponents/SDropDownDosage.js +0 -1087
  118. package/src/CustomComponents/SwipableProductCard.js +0 -246
  119. package/src/CustomComponents/SwipableProductImageCard.js +0 -254
  120. package/src/CustomComponents/WorkOrderDetails.js +0 -1216
  121. package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
  122. package/src/HOC/ConfirmOverlay.js +0 -192
  123. package/src/HOC/HHeading.js +0 -70
  124. package/src/HOC/HMoreButton.js +0 -88
  125. package/src/HOC/HNatureHeading.js +0 -402
  126. package/src/HOC/HOCIcons.js +0 -80
  127. package/src/HOC/HOverlayCentered.js +0 -140
  128. package/src/HOC/HShadowButton.js +0 -45
  129. package/src/HOC/HShadowCountButton.js +0 -82
  130. package/src/HOC/OptionOverlay.js +0 -48
  131. package/src/Json/Chart.json +0 -818
  132. package/src/Json/Consultation.json +0 -622
  133. package/src/Json/CreditBill.json +0 -490
  134. package/src/Json/Dropdown.json +0 -216
  135. package/src/Json/DropdownConsultation.json +0 -228
  136. package/src/Json/DynamicReports.json +0 -623
  137. package/src/Json/Footer.json +0 -79
  138. package/src/Media/AudioScreen.js +0 -342
  139. package/src/Media/BarcodeScan.js +0 -145
  140. package/src/Media/CAudioPlay.js +0 -228
  141. package/src/Media/CCaptureImageWithoutEdit.js +0 -330
  142. package/src/Media/CImageGallery.js +0 -289
  143. package/src/Media/CImageZoom.js +0 -82
  144. package/src/Media/CSingleImage.js +0 -391
  145. package/src/Media/CSketchCanvas.js +0 -76
  146. package/src/Media/CVideoPlay.js +0 -31
  147. package/src/Media/DocumentScreen.js +0 -362
  148. package/src/Media/DrawingScreen.js +0 -578
  149. package/src/Media/ImageScreen.js +0 -309
  150. package/src/Media/RecordAudio.js +0 -250
  151. package/src/Media/RecordVideo.js +0 -223
  152. package/src/Media/VideoScreen.js +0 -378
  153. package/src/Navigation/PageNavigation.js +0 -224
  154. package/src/Navigation/useFocusEffect.js +0 -2
  155. package/src/Navigation/useFocusEffect.native.js +0 -1
  156. package/src/Navigation/useFocusEffect.web.js +0 -1
  157. package/src/Navigation/useIsFocused.js +0 -1
  158. package/src/Navigation/useIsFocused.native.js +0 -1
  159. package/src/Navigation/useIsFocused.web.js +0 -1
  160. package/src/Navigation/useNavigation.js +0 -2
  161. package/src/Navigation/useNavigation.native.js +0 -1
  162. package/src/Navigation/useNavigation.web.js +0 -1
  163. package/src/Screens/CMedications.js +0 -528
  164. package/src/Screens/CWebViewGallery.js +0 -203
  165. package/src/Screens/ChartScan.js +0 -279
  166. package/src/Screens/ChartScreenNew.js +0 -1579
  167. package/src/Screens/Consultation.js +0 -1500
  168. package/src/Screens/Dashboard.js +0 -778
  169. package/src/Screens/FileExplorer.js +0 -288
  170. package/src/Screens/Footer.js +0 -340
  171. package/src/Screens/ForgotPassword.js +0 -288
  172. package/src/Screens/HeaderBlock.js +0 -353
  173. package/src/Screens/Login.js +0 -328
  174. package/src/Screens/Notification.js +0 -149
  175. package/src/Screens/OcrScreen.js +0 -20
  176. package/src/Screens/PdfPreview.js +0 -507
  177. package/src/Screens/RegistrationDetails.js +0 -467
  178. package/src/Screens/SearchScreen.js +0 -582
  179. package/src/Screens/Splash.js +0 -788
  180. package/src/Screens/SwipeLeftView.js +0 -1867
  181. package/src/StaticComponents/SAlphabet.js +0 -47
  182. package/src/StaticComponents/SCheckBox.js +0 -42
  183. package/src/StaticComponents/SDatePicker.js +0 -208
  184. package/src/StaticComponents/SDatePickerLabel.js +0 -253
  185. package/src/StaticComponents/SDatePickerNew.js +0 -258
  186. package/src/StaticComponents/SDateTimePickerNew.js +0 -381
  187. package/src/StaticComponents/SDropDownGenerate.js +0 -450
  188. package/src/StaticComponents/SDropDownHoc.js +0 -636
  189. package/src/StaticComponents/SDropDownIcon.js +0 -500
  190. package/src/StaticComponents/SMenuBox.js +0 -131
  191. package/src/StaticComponents/SOverlay.js +0 -177
  192. package/src/StaticComponents/SOverlayTextInput.js +0 -109
  193. package/src/StaticComponents/SSearch.js +0 -438
  194. package/src/StaticComponents/SSearchBar.js +0 -53
  195. package/src/StaticComponents/SSpeedDial.js +0 -303
  196. package/src/StaticComponents/STextInput.js +0 -289
  197. package/src/StaticComponents/STextInputProps.js +0 -36
  198. package/src/StaticComponents/STimePicker.js +0 -171
  199. package/src/StaticComponents/STimingDropDownNew.js +0 -1585
  200. package/src/StaticComponents/STimingSwitch.js +0 -34
  201. package/src/layout/CContainerView.js +0 -21
  202. package/src/layout/CDetailView.js +0 -81
  203. package/src/layout/HeaderBlock.js +0 -353
  204. package/src/layout/INVLoginLayout.js +0 -657
  205. package/src/layout/Loader.js +0 -176
@@ -1,203 +0,0 @@
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
-
@@ -1,279 +0,0 @@
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
- });