@jescon-technologies/react-native-ui-kit 0.0.5 → 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,1579 +0,0 @@
1
- import React, { useState, useRef, useEffect, useContext } from 'react';
2
- import { StyleSheet, Dimensions, View, Text, FlatList, Image, TouchableOpacity, Button, PermissionsAndroid, TextInput, RefreshControl, Platform, TouchableWithoutFeedback, ScrollView } from 'react-native';
3
- import Loader from '../Custom/Loader';
4
- import { Global } from '../../../../../src/Common/Global';
5
- import HeaderBlock from './HeaderBlock';
6
- import CContainerView from '../CustomComponents/CContainerView';
7
- import CDetailView from '../CustomComponents/CDetailView';
8
- import CFooterView from '../CustomComponents/CFooterView';
9
- import RNHTMLtoPDF from 'react-native-html-to-pdf';
10
- import { normalize } from '../CommonStyle/componentStyle';
11
- import { imageURL, audioURL, videoURL, pdfURL, APIURL } from '../../../../../src/Common/apiConstants';
12
- import WebView from 'react-native-webview';
13
- import NetworkServiceCall from '../Common/NetworkServiceCall';
14
- import axios from 'axios';
15
- import { ArrayCheck, CButtonShadow, CShadowDynamic, getLoading, isBNUL, isNU, isNUQ, isNUQZ, isPermitted, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
16
- import RNFetchBlob from 'rn-fetch-blob';
17
- import { ActivityIndicator } from 'react-native';
18
- import moment from 'moment';
19
- // import Dropdown from '../Json/Dropdown.json'
20
- import HReportFormat from '../Html/HReportFormat';
21
- import HReportHeader from '../Html/HReportHeader';
22
- import HReportFooter from '../Html/HReportFooter';
23
- import HReportPatientChart from '../Html/HReportPatientChart';
24
- // import HOCIcons from '../HOC/HOCIcons';
25
- import SSearch from '../StaticComponents/SSearch';
26
- import { Menu, MenuOption, MenuOptions, MenuProvider, MenuTrigger } from 'react-native-popup-menu';
27
- import CDropDownList from '../CustomComponents/CDropDownList';
28
- import SDatePickerLabel from '../StaticComponents/SDatePickerLabel';
29
- import CCustomTextInput from '../CustomComponents/CCustomTextInput';
30
- // import CButtonDropDown from '../CustomComponents/CButtonDropDown';
31
- import HHeading from '../HOC/HHeading';
32
- import ReactNativeBlobUtil from 'rn-fetch-blob';
33
- import CChartScanOverlay from '../CustomComponents/CChartScanOverlay';
34
- import HShadowButton from '../HOC/HShadowButton';
35
- import { useNavigation } from '../Navigation/useNavigation';
36
-
37
- import HtmlContentViewer from '../CustomComponents/HtmlContentViewer';
38
- import CModalOverlay from '../CustomComponents/CModalOverlay';
39
- import CAwesomeButton from '../CustomComponents/CAwesomeButton';
40
- import HOCIcons from '../HOC/HOCIcons';
41
-
42
- const ChartScreenNew = (props) => {
43
-
44
- useEffect(() => {
45
- getNatureData();
46
- }, []);
47
-
48
- const navigation = useNavigation();
49
- const webviewRef = useRef();
50
- const [refresh, setRefresh] = useState(0);
51
- const [isLoading, setIsLoading] = useState(false);
52
- const [overlayVisible, setOverlayVisible] = useState(false);
53
- const [DateView, setDateView] = useState(false);
54
- const [searchNature, setSearchNature] = useState('');
55
- const [HtmlData, setHtmlData] = useState();
56
- const [criteriafornature, setCriteriaForNature] = useState();
57
- const [chartScanOverlay, setChartScanOverlay] = useState(false);
58
- const [chartScanData, setChartScanData] = useState();
59
- const [criteriainfo, setCiteriaInfo] = useState();
60
- const [FormatType, setFormatType] = useState();
61
- const [criteriadate, setCiteriaDate] = useState();
62
- const [RetryView, setRetryView] = useState(true);
63
- function getChartData(info, dates, nature, firsttime) {
64
-
65
- setIsLoading(true);
66
- setHtmlData();
67
-
68
- let buttonapi = APIURL + 'insurancesaveresponse//RnResponse';
69
- let output = {};
70
- output.groups = {
71
- "procedurename": 'rnlapatientrecord',
72
- "hopapatient": Global.PatientDetails.hopapatient,
73
- "displaystatus": firsttime ? 0 : 1,
74
- ...info,
75
- ...dates,
76
- 'criterianature': nature
77
-
78
- };
79
- console.log('buttonapi', buttonapi);
80
- console.log('output Json', JSON.stringify(output));
81
-
82
- NetworkServiceCall('post', buttonapi, output)
83
- .then(function (response) {
84
- if (response.httpstatus == 200 && isNU(response.data) && isNU(response.data.response) && isBNUL(response.data.response.editArray) && response.data.response.editArray.length == 3) {
85
- setHtmlData(response.data.response.editArray);
86
- setIsLoading(false);
87
- }
88
- else {
89
- setIsLoading(false);
90
- notifyMessage('Data not found.', 2);
91
- }
92
- })
93
- }
94
-
95
- function getNatureData() {
96
-
97
- setIsLoading(true);
98
-
99
- setCriteriaForNature();
100
- let buttonapi = APIURL + 'insuranceadvanceget/emrcommonget/rnhomrclassificationnatures';
101
- console.log('buttonapi', buttonapi);
102
-
103
- NetworkServiceCall("get", buttonapi, "")
104
- .then(function (response) {
105
- if (response.httpstatus == 200 && isNU(response.data) && isBNUL(response.data.data)) {
106
-
107
- const updatedData = isNUQZ(props.route.params.specificnature) ? response.data.data.map((item) => ({ ...item, selected: SpecificNatureChecker(item) })) : response.data.data.map((item) => ({ ...item, selected: 1 }));
108
- const constcriteriainfo = {
109
- 'formattype': 3,
110
- 'treatmenttype': isNU(Global.PatientDetails) && isBNUL(Global.PatientDetails.profilecontent) && isNUQ(Global.PatientDetails.profilecontent[0].patienttype) && Global.PatientDetails.profilecontent[0].patienttype == "IP" ? 4 : 5,
111
- 'consultation': isNU(Global.PatientDetails) && isBNUL(Global.PatientDetails.profilecontent) && isNUQ(Global.PatientDetails.profilecontent[0].patienttype) && Global.PatientDetails.profilecontent[0].patienttype == "IP" ? 0 : 1,
112
- 'admission': isNU(Global.PatientDetails) && isBNUL(Global.PatientDetails.profilecontent) && isNUQ(Global.PatientDetails.profilecontent[0].patienttype) && Global.PatientDetails.profilecontent[0].patienttype == "IP" ? 1 : 0,
113
- 'current': 1,
114
- };
115
- const constformattype = [
116
- {
117
- 'icongroup': 3,
118
- 'icon': 'table-large',
119
- 'datavalue': 1,
120
- 'displayvalue': 'SUMMARY',
121
- },
122
- {
123
- 'icongroup': 5,
124
- 'icon': 'file-invoice',
125
- 'datavalue': 2,
126
- 'displayvalue': 'DETAILED\nSUMMARY',
127
- },
128
- {
129
- 'icongroup': 3,
130
- 'icon': 'file-table',
131
- 'datavalue': 3,
132
- 'displayvalue': 'DETAILED\nDESCRIPTION',
133
- }
134
- ];
135
- const constcriteriadate = {
136
- 'fromdate': props.route.params.customdate ? props.route.params.fromdate : '', // moment().format('YYYY-MM-DD')
137
- 'todate': props.route.params.customdate ? props.route.params.todate : ''
138
- };
139
- setCiteriaInfo(constcriteriainfo);
140
- setFormatType(constformattype);
141
- setCiteriaDate(constcriteriadate);
142
- setCriteriaForNature(updatedData);
143
- setRetryView(false);
144
- getChartData(constcriteriainfo, constcriteriadate, updatedData, true);
145
- }
146
- else {
147
- setIsLoading(false);
148
- }
149
- })
150
- }
151
-
152
- function getChartScan() {
153
-
154
- setIsLoading(true);
155
- setChartScanData();
156
-
157
- let fromdate = isNUQ(criteriadate.fromdate) ? "'" + criteriadate.fromdate + "'" : "''";
158
- let todate = isNUQ(criteriadate.todate) ? "'" + criteriadate.todate + "'" : "''";
159
-
160
- let buttonapi = APIURL + 'insuranceadvanceget/emrcommonget/rnhomrchartfiles ' + Global.PatientDetails.hopapatient + "," + null + ',' + 1 + "," + fromdate + "," + todate;
161
-
162
- console.log('getChartScan buttonapi', buttonapi);
163
-
164
- NetworkServiceCall("get", buttonapi, "")
165
- .then(function (response) {
166
- if (response.httpstatus == 200 && isNU(response.data) && isBNUL(response.data.data)) {
167
-
168
- // let jsondata = {
169
- // 'heading': 'CHART SCAN',
170
- // 'icongroup': 3,
171
- // 'icon': 'scanner',
172
- // 'datearray': [
173
- // {
174
- // 'heading': 'Array 1',
175
- // 'icon': 'file-alt',
176
- // 'hideheading': true,
177
- // 'naturearray': [
178
- // {
179
- // 'heading': 'Array 2',
180
- // 'icon': 'file-alt',
181
- // 'hideheading': true,
182
- // 'filetypearray': response.data.data
183
- // },
184
- // ]
185
- // }
186
- // ]
187
- // }
188
- setIsLoading(false);
189
- let jsondata = {
190
- 'heading': 'CHART SCAN',
191
- 'icongroup': 3,
192
- 'icon': 'scanner',
193
- 'datearray': [
194
- {
195
- 'heading': 'Array 1',
196
- 'icon': 'file-alt',
197
- 'hideheading': true,
198
- 'naturearray': response.data.data
199
- }
200
- ]
201
- }
202
- setChartScanData(jsondata);
203
- setTimeout(() => {
204
- setChartScanOverlay(true);
205
- });
206
-
207
-
208
- }
209
- else {
210
- setIsLoading(false);
211
- notifyMessage('No Files Available.');
212
- }
213
- });
214
- }
215
-
216
- function getChartFiles() {
217
-
218
- setIsLoading(true);
219
- setChartScanData();
220
-
221
- let fromdate = isNUQ(criteriadate.fromdate) ? "'" + criteriadate.fromdate + "'" : "''";
222
- let todate = isNUQ(criteriadate.todate) ? "'" + criteriadate.todate + "'" : "''";
223
-
224
- let buttonapi = APIURL + 'insuranceadvanceget/emrcommonget/rnhomrchartfiles ' + Global.PatientDetails.hopapatient + "," + null + ',' + 2 + "," + fromdate + "," + todate;
225
-
226
- console.log('getChartScan buttonapi', buttonapi);
227
-
228
- NetworkServiceCall("get", buttonapi, "")
229
- .then(function (response) {
230
- if (response.httpstatus == 200 && isNU(response.data) && isBNUL(response.data.data)) {
231
-
232
- setIsLoading(false);
233
- let jsondata = {
234
- 'heading': 'FILES',
235
- 'icon': 'folder',
236
- 'icongroup': 4,
237
- 'datearray': response.data.data
238
- }
239
- setChartScanData(jsondata);
240
- setTimeout(() => {
241
- setChartScanOverlay(true);
242
- });
243
-
244
- }
245
- else {
246
- setIsLoading(false);
247
- notifyMessage('No Files Available.');
248
- }
249
- });
250
-
251
- }
252
-
253
- function SpecificNatureChecker(item) {
254
-
255
- // patient card array nature array
256
- // prescription 1 -- 20
257
- // vital 5 -- 10
258
- // service 4 -- 17
259
- // chart 0 -- 0
260
-
261
- if (props.route.params.specificnature == 1 && item.code == 20) {
262
- return 1;
263
- }
264
- else if (props.route.params.specificnature == 5 && item.code == 10) {
265
- return 1;
266
- }
267
- else if (props.route.params.specificnature == 4 && item.code == 17) {
268
- return 1;
269
- }
270
- else {
271
- return 0;
272
- }
273
-
274
- }
275
-
276
- function getFilter(params) {
277
-
278
- switch (params.datavalue) {
279
- case 1: // all
280
- setCiteriaDate({
281
- "fromdate": '',
282
- "todate": ''
283
- });
284
- setDateView(false);
285
- break;
286
- case 2: // today
287
- setCiteriaDate({
288
- "fromdate": moment().format('YYYY-MM-DD'),
289
- "todate": moment().format('YYYY-MM-DD')
290
- });
291
- setDateView(false);
292
- break;
293
- case 3: // yesterday
294
- var dayBefore = moment(moment().format('YYYY-MM-DD')).subtract(1, 'days');
295
- setCiteriaDate({
296
- "fromdate": moment(dayBefore).format('YYYY-MM-DD'),
297
- "todate": moment().format('YYYY-MM-DD')
298
- });
299
- setDateView(false);
300
- break;
301
- case 4: // one week before
302
- var dayBefore = moment(moment().format('YYYY-MM-DD')).subtract(7, 'days');
303
- setCiteriaDate({
304
- "fromdate": moment(dayBefore).format('YYYY-MM-DD'),
305
- "todate": moment().format('YYYY-MM-DD')
306
- });
307
- setDateView(false);
308
- break;
309
- case 5: // one month before
310
- var dayBefore = moment(moment().format('YYYY-MM-DD')).subtract(1, 'month');
311
- setCiteriaDate({
312
- "fromdate": moment(dayBefore).format('YYYY-MM-DD'),
313
- "todate": moment().format('YYYY-MM-DD')
314
- });
315
- setDateView(false);
316
- break;
317
- case 6: // 6 month before
318
- var dayBefore = moment(moment().format('YYYY-MM-DD')).subtract(6, 'month');
319
- setCiteriaDate({
320
- "fromdate": moment(dayBefore).format('YYYY-MM-DD'),
321
- "todate": moment().format('YYYY-MM-DD')
322
- });
323
- setDateView(false);
324
- break;
325
- case 7: // one year before
326
- var dayBefore = moment(moment().format('YYYY-MM-DD')).subtract(1, 'year');
327
- setCiteriaDate({
328
- "fromdate": moment(dayBefore).format('YYYY-MM-DD'),
329
- "todate": moment().format('YYYY-MM-DD')
330
- });
331
- setDateView(false);
332
- break;
333
- case 8: // one year before
334
- var dayBefore = moment(moment().format('YYYY-MM-DD')).subtract(5, 'year');
335
- setCiteriaDate({
336
- "fromdate": moment(dayBefore).format('YYYY-MM-DD'),
337
- "todate": moment().format('YYYY-MM-DD')
338
- });
339
- setDateView(false);
340
- break;
341
- case 9: //date view
342
- console.log('pressed 9')
343
- setCiteriaDate({
344
- "fromdate": moment().format('YYYY-MM-DD'),
345
- "todate": moment().format('YYYY-MM-DD')
346
- });
347
- setDateView(true);
348
- break;
349
- }
350
- }
351
-
352
- const closeOverlay = () => {
353
- setOverlayVisible(false);
354
- }
355
-
356
- function getOverlayChildrenWrapperStyle() {
357
- return ({
358
-
359
-
360
- position: 'absolute',
361
- bottom: 0,
362
- top: Dimensions.get('screen').height * (0.131),
363
- borderTopLeftRadius: 10,
364
- borderTopRightRadius: 10,
365
- borderColor: Global.AppTheme.primary_color,
366
- borderWidth: 2,
367
- alignItems: 'center',
368
- alignSelf: 'center',
369
- justifyContent: 'flex-start',
370
- width: Dimensions.get('window').width,
371
- padding: 0
372
-
373
-
374
-
375
-
376
-
377
-
378
- })
379
- }
380
-
381
- const PreviewPDF = async () => {
382
-
383
- if (await isPermitted()) {
384
- setIsLoading(true);
385
-
386
- const results = await RNHTMLtoPDF.convert({
387
- html: HReportFormat(HtmlData[1].value, HReportHeader({ "patientid": ValueCheck(Global.PatientDetails) && ValueCheck(Global.PatientDetails.profilecontent[0].patientno) ? Global.PatientDetails.profilecontent[0].patientno : '' }), HReportFooter(), '110px', '80px'),
388
- fileName: 'patient report',
389
- base64: true,
390
- height: 842, // a5 - 596(points) 21(cm) // a4 - 842(points) 29.7(cm)
391
- width: 596 // a5 - 420(points) 14.8(cm) // a4 - 596(points) 21(cm)
392
- }).catch(errors => {
393
- setIsLoading(false);
394
- });
395
-
396
- const fileBase64 = await ReactNativeBlobUtil.fs.readFile(results.filePath, 'base64');
397
- const filePath = RNFetchBlob.fs.dirs.DownloadDir + '/' + moment().format('DD-MM-YYYY hmmssSSS') + '.pdf';
398
- RNFetchBlob.fs.writeFile(filePath, fileBase64, 'base64').then(response => {
399
- notifyMessage(filePath, 1),
400
- setIsLoading(false);
401
- })
402
- .catch(errors => {
403
- notifyMessage("Download Failed", 2)
404
- setIsLoading(false);
405
- });
406
- setIsLoading(false);
407
- }
408
- }
409
-
410
- function fnHeaderData(i) {
411
- let temp = i && i != null && i != undefined ?
412
- i.map(u => (u.componentname == 'header' ? u.value : '')).join('') : ' ';
413
- return temp;
414
- }
415
-
416
- function fnFooterData(i) {
417
- let temp = i && i != null && i != undefined ?
418
- i.map(u => (u.componentname == 'footer' ? u.value : '')).join('') : ' ';
419
- return temp;
420
- }
421
-
422
- function fnContentData(i) {
423
- let temp = i && i != null && i != undefined ?
424
- i.map(u => u.componentname != 'header' && u.componentname != 'footer' ? u.value : '').join('') : ' ';
425
- return temp;
426
- }
427
-
428
- const transformJson = (input) => {
429
-
430
- return {
431
- data: input.map(({ editArray, pdffile }) => ({
432
- filelink: HReportFormat(fnContentData(editArray), fnHeaderData(editArray), fnFooterData(editArray), '70px', '80px'),
433
- filename: ' '
434
- })).filter(item => isNUQ(item.filename) && isNUQ(item.filelink))
435
- };
436
- };
437
-
438
- function HistoryPdf(item) {
439
-
440
- setIsLoading(true);
441
-
442
- let buttonapi = APIURL + 'insuranceadvanceget/emrcommonget/rnhomrsummaryhistory ' + Global.PatientDetails.hopapatient + ',' + item.naturecode;
443
- console.log('buttonapi', buttonapi);
444
-
445
- NetworkServiceCall("get", buttonapi, "")
446
- .then(function (response) {
447
- console.log('HistoryPdf', JSON.stringify(response));
448
- if (response.httpstatus == 200 && isNU(response.data) && isBNUL(response.data.groups)) {
449
- navigation.navigate('WebViewGallery', {
450
- 'displayarray': [...transformJson(response.data.groups).data]
451
- })
452
- setIsLoading(false);
453
- }
454
- else {
455
- notifyMessage('Summary not available.')
456
- setIsLoading(false)
457
- }
458
- })
459
-
460
- }
461
-
462
- function getAllTabFunctions(key, item) {
463
-
464
- switch (key) {
465
- case "CS01":
466
- // Allpdf();
467
- PreviewPDF();
468
- break;
469
- case "CS02":
470
- getChartScan();
471
- break;
472
- case "CS03":
473
- getChartFiles();
474
- break;
475
- case "CS04":
476
- setOverlayVisible(true);
477
- break;
478
- case "CS06":
479
- HistoryPdf(item)
480
- break;
481
- case "CS07":
482
- HistoryPdf(item)
483
- break;
484
- case "CS08":
485
- HistoryPdf(item)
486
- break;
487
- case "CS09":
488
- HistoryPdf(item)
489
- break;
490
- case "CS10":
491
- HistoryPdf(item)
492
- break;
493
- case "CS11":
494
- HistoryPdf(item)
495
- break;
496
- case "CS12":
497
-
498
- break;
499
-
500
-
501
- }
502
- }
503
-
504
- function CheckAllSelected(array) {
505
-
506
- let prevcodearray = array.filter((i, k) => { return i.selected == 1 ? { ...i } : undefined });
507
- let prevcode = isBNUL(prevcodearray) && (prevcodearray.length == array.length) ? true : false;
508
- return prevcode;
509
-
510
- }
511
-
512
- function CheckAllSelectedCount(array) {
513
-
514
- let prevcodearray = array.filter((i, k) => { return i.selected == 1 ? { ...i } : undefined });
515
- let prevcode = isBNUL(prevcodearray) ? prevcodearray.length : 0;
516
- return prevcode;
517
-
518
- }
519
-
520
- function RenderNature(val) {
521
-
522
- return (
523
- <TouchableWithoutFeedback>
524
- <View style={{ padding: normalize(3), borderWidth: 0 }}>
525
- <View
526
- style={{
527
- borderWidth: 1,
528
- borderRadius: 5,
529
- borderColor: 'lightgrey',
530
- padding: normalize(5),
531
- elevation: 2,
532
- backgroundColor: 'white'
533
- }}
534
- >
535
- <TouchableOpacity
536
- disabled={val.item.selected ? false : true}
537
- onPress={() => {
538
- val.item.showview = !val.item.showview;
539
- setRefresh(refresh + 1);
540
- }}
541
- style={{ flexDirection: 'row', justifyContent: 'space-between', width: '100%' }}>
542
- <View style={{ flexDirection: 'row', alignItems: 'center', flex: 1 }}>
543
- <HOCIcons.Icons
544
- icongroup={val.item.icongroup ? val.item.icongroup : 5}
545
- name={val.item.icon ? val.item.icon : 'file-alt'}
546
- size={normalize(18)}
547
- color={val.item.selected ? Global.AppTheme.primary_color : 'grey'}
548
- style={{ width: normalize(30), borderWidth: 0, textAlign: 'center' }}
549
- />
550
- <Text adjustsFontSizeToFit style={{
551
- paddingLeft: normalize(5),
552
- fontWeight: 'bold',
553
- color: val.item.selected ? Global.AppTheme.primary_color : 'grey',
554
- fontSize: normalize(14)
555
- }}>
556
- {val.item.displayname}
557
- </Text>
558
- </View>
559
- {val.item.selected == 1 ?
560
- <View style={{ marginHorizontal: normalize(10), marginVertical: normalize(5) }}>
561
- <TouchableOpacity
562
- onPress={() => {
563
- val.item.showview = !val.item.showview;
564
- setRefresh(refresh + 1);
565
- }}
566
- style={{}}>
567
- <HOCIcons.FontAwesome5
568
- name={val.item.showview ? 'chevron-up' : 'chevron-down'}
569
- size={normalize(18)}
570
- color={Global.AppTheme.primary_color}
571
- style={{ textAlign: 'center', borderWidth: 0 }}
572
- />
573
- </TouchableOpacity>
574
- </View>
575
- : null}
576
- <View>
577
- <TouchableOpacity
578
- onPress={() => {
579
- if (val.item.selected == 1) {
580
- val.item.selected = 0;
581
- setRefresh(refresh + 1);
582
- }
583
- else {
584
- val.item.selected = 1;
585
- setRefresh(refresh + 1);
586
- }
587
- }}
588
- style={{}}>
589
- <HOCIcons.Fontisto
590
- name={val.item.selected == 1 ? 'toggle-on' : 'toggle-off'}
591
- size={normalize(25)}
592
- color={val.item.selected == 1 ? 'green' : '#646464'}
593
- style={{ textAlign: 'center', borderWidth: 0 }}
594
- />
595
- </TouchableOpacity>
596
- </View>
597
- </TouchableOpacity>
598
- {val.item.selected && isBNUL(val.item.data) && val.item.showview ?
599
- <View style={{ flexDirection: 'row', flexWrap: 'wrap', borderWidth: 0 }}>
600
- {val.item.data.map((val) => {
601
- return (
602
- renderProperties(val)
603
- )
604
- })}
605
- </View>
606
- : null}
607
- </View>
608
- </View>
609
- </TouchableWithoutFeedback>
610
- )
611
- }
612
-
613
- function renderProperties(val) {
614
-
615
- return (
616
- <View style={{ marginHorizontal: normalize(2), marginVertical: normalize(7), padding: normalize(7), minWidth: normalize(80), minHeight: normalize(50), borderWidth: 0.5, borderRadius: 5, borderColor: 'lightgrey' }}>
617
-
618
- {isBNUL(val.tagproperties) ?
619
- <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
620
- {val.tagproperties.map((s) => {
621
- return (
622
- renderDetail(s, val)
623
- )
624
- })}
625
- </View>
626
- : null}
627
- <Text style={{
628
- position: 'absolute',
629
- backgroundColor: 'white',
630
- top: normalize(-7),
631
- left: normalize(10),
632
- fontSize: normalize(12),
633
- color: Global.AppTheme.primary_color,
634
- }}>
635
- {val.displayname ? val.displayname : null}
636
- </Text>
637
- </View>
638
- )
639
-
640
- }
641
-
642
- function renderDetail(val, abovedata) {
643
-
644
- return (
645
- <TouchableOpacity
646
- onPress={() => {
647
- abovedata.displayvalue = val.displayname;
648
- abovedata.datavalue = val.code;
649
- setRefresh(refresh + 1);
650
- }}
651
- style={{
652
- borderRadius: 5,
653
- borderWidth: 0.5,
654
- // height: normalize(45),
655
- // width: normalize(45),
656
- borderColor: 'lightblue',
657
- justifyContent: 'center',
658
- alignItems: 'center',
659
- elevation: 2,
660
- margin: normalize(4),
661
- padding: normalize(5),
662
- paddingHorizontal: normalize(10),
663
- backgroundColor: abovedata.datavalue == val.code ? Global.AppTheme.selected_color : 'white'
664
- }}>
665
- <HOCIcons.Icons
666
- icongroup={isNU(val.icongroup) ? val.icongroup : 5}
667
- name={isNUQ(val.icon) ? val.icon : 'table'}
668
- size={normalize(20)}
669
- color={Global.AppTheme.primary_color}
670
- />
671
- <Text adjustsFontSizeToFit style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color, textAlign: 'center' }}>{val.displayname ? val.displayname : null}</Text>
672
- </TouchableOpacity>
673
- )
674
- }
675
-
676
- function TreatmentTypeFunction(criteria, type) {
677
-
678
- switch (type) {
679
- case 1:
680
- criteria.consultation = criteria.consultation === 1 ? 0 : 1;
681
- break;
682
- case 2:
683
- criteria.admission = criteria.admission === 1 ? 0 : 1;
684
- break;
685
- case 3:
686
- criteria.current = criteria.current === 1 ? 0 : 1;
687
- break;
688
- }
689
- CheckTreatmentType(criteria);
690
-
691
- }
692
-
693
- function CheckTreatmentType(criteria) {
694
-
695
- const key = `${criteria.consultation}${criteria.admission}${criteria.current}`;
696
-
697
- const actions = {
698
- '100': () => { criteria.treatmenttype = 1; }, // consultation only.
699
- '010': () => { criteria.treatmenttype = 2; }, // admission only.
700
- '110': () => { criteria.treatmenttype = 3; }, // consultation and admission
701
- '011': () => { criteria.treatmenttype = 4; }, // current admission
702
- '101': () => { criteria.treatmenttype = 5; }, // current consultation
703
- '000': () => { criteria.treatmenttype = 6; }, // no option selected. (please select consultation or admission)
704
- '001': () => { criteria.treatmenttype = 7; }, // current only so invalid. ( please select consultation or admission)
705
- '111': () => {
706
- criteria.current = 0;
707
- criteria.treatmenttype = 3;
708
- }, // consultation and admission
709
- };
710
-
711
- if (actions[key]) {
712
- actions[key]();
713
- }
714
- setRefresh(refresh + 1);
715
-
716
- }
717
-
718
- function RenderFlashList(array) {
719
-
720
- // let newdata = isBNUL(array) ? array.filter(function (item) { return item }) : [];
721
-
722
- const filteredData = array.filter((item) => item.displayname.toLowerCase().includes(searchNature.toLowerCase()));
723
-
724
-
725
- return (
726
- isBNUL(filteredData) ?
727
- <FlatList
728
- data={filteredData}
729
- nestedScrollEnabled={true}
730
- renderItem={RenderNature}
731
- estimatedItemSize={normalize(180)}
732
- />
733
- : null
734
- )
735
-
736
- }
737
-
738
- function SelectDeselectNature(i) {
739
-
740
- const updatedData = criteriafornature.map((item) => ({ ...item, selected: i }));
741
- setCriteriaForNature(updatedData);
742
-
743
- }
744
-
745
- function ChangeFormatType(i, val) {
746
-
747
- const updatedData = criteriafornature.map((item) => ({
748
- ...item,
749
- 'data': item.data.map((items) => (
750
- items.code == 2 ?
751
- {
752
- ...items,
753
- 'datavalue': val.datavalue,
754
- 'displayvalue': val.displayvalue
755
- }
756
- :
757
- {
758
- ...items,
759
- }
760
-
761
- ))
762
- }));
763
- setCriteriaForNature(updatedData);
764
-
765
- }
766
-
767
- function buttonView(item, width) {
768
-
769
- return (
770
- <HShadowButton
771
- useicon={true}
772
- usetext={true}
773
- disabled={false}
774
- buttonstyle={[styles.footerButton, CShadowDynamic(-3, 3, 5, 0, Global.AppTheme.primary_color)]}
775
- iconcolor={Global.AppTheme.primary_color}
776
- icongroup={item.icongroup}
777
- iconname={item.iconname}
778
- iconsize={normalize(24)}
779
- displaytext={item.displaytext}
780
- buttonCallback={() => {
781
- getAllTabFunctions(item.functionid, item)
782
- }}
783
- textstyle={styles.optionText}
784
- />
785
- )
786
-
787
- }
788
-
789
- return (
790
- <CContainerView>
791
- <HeaderBlock
792
- style={{ marginBottom: normalize(30) }}
793
- navigation={navigation}
794
- backhandler={false}
795
- />
796
- <CDetailView>
797
- <View style={{
798
- flex: 1,
799
- backgroundColor: 'white',
800
- borderColor: 'black',
801
- }}>
802
- <HHeading
803
- styles={{
804
- "iconname": 'user-alt',
805
- "bgcolor": "#f2efef",
806
- "iconsize": 16,
807
- "iconcolor": Global.AppTheme.primary_color,
808
- "displaytext": 'PATIENT CHART',
809
- "textsize": 14,
810
- "textcolor": Global.AppTheme.primary_color
811
- }}
812
- callBack={val => (val == undefined ? null : console.log(val))}>
813
- </HHeading>
814
- <View style={{ flex: 1 }}>
815
-
816
-
817
-
818
- {isBNUL(HtmlData) ?
819
- (console.log('HtmlData', HReportFormat(HtmlData[1].value, HReportHeader({ "patientid": ValueCheck(Global.PatientDetails) && ValueCheck(Global.PatientDetails.profilecontent[0].patientno) ? Global.PatientDetails.profilecontent[0].patientno : '' }), HReportFooter(), '150px', '80px')),
820
- <HtmlContentViewer
821
- htmlContent={HReportFormat(HtmlData?.[1]?.value, HReportHeader({ "patientid": ValueCheck(Global?.PatientDetails) && ValueCheck(Global?.PatientDetails?.profilecontent[0]?.patientno) ? Global?.PatientDetails?.profilecontent[0]?.patientno : '' }), HReportFooter(), '150px', '80px')}
822
- iframeRef={webviewRef}
823
- height={500}
824
- />
825
- )
826
- : null}
827
-
828
- </View>
829
-
830
- {isLoading ?
831
- <Loader displaytext={true} />
832
- : null}
833
-
834
- {chartScanOverlay && isNU(chartScanData) ?
835
- <CChartScanOverlay
836
- headingstyle={{
837
- heading: chartScanData.heading,
838
- headingicon: chartScanData.icon,
839
- headingicongroup: chartScanData.icongroup,
840
- height: 0.131
841
- }}
842
- overlaydata={chartScanData}
843
- closeOverlay={() => {
844
- setChartScanOverlay(false);
845
- }}
846
- />
847
- : null}
848
-
849
- {overlayVisible && isNU(criteriainfo) && isBNUL(criteriafornature) && isBNUL(FormatType) ?
850
- <CModalOverlay
851
- visible={overlayVisible}
852
- onClose={() => {
853
- closeOverlay();
854
- }}
855
- closeOnTouchOutside={true}
856
- // containerStyle={{ backgroundColor: 'transparent' }}
857
- containerStyle={{ backgroundColor: 'rgba(0, 0, 0, 0)' }}
858
- childrenWrapperStyle={getOverlayChildrenWrapperStyle()}
859
- // animationType="fadeInUp"
860
- // animationDuration={1700}
861
- >
862
- <View style={{ width: '100%', flex: 1 }}>
863
- <View style={{
864
- borderWidth: 0,
865
- flexDirection: 'row',
866
- backgroundColor: '#f0f0f0',
867
- alignItems: 'center',
868
- justifyContent: 'space-between',
869
- borderTopLeftRadius: 7,
870
- borderTopRightRadius: 7,
871
- paddingVertical: normalize(5)
872
- }}>
873
- <View style={{ borderWidth: 0, flex: 1, }}>
874
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
875
- <HOCIcons.Icons
876
- icongroup={5}
877
- name={'list-alt'}
878
- size={normalize(18)}
879
- color={Global.AppTheme.primary_color}
880
- style={{ width: normalize(30), borderWidth: 0, textAlign: 'center' }}
881
- />
882
- <Text adjustsFontSizeToFit style={{
883
- paddingLeft: normalize(5),
884
- fontWeight: 'bold',
885
- color: Global.AppTheme.primary_color,
886
- fontSize: normalize(14)
887
- }}>
888
- {'PATIENT Criteria'}
889
- </Text>
890
- </View>
891
- </View>
892
-
893
- <TouchableOpacity
894
- onPress={() => {
895
- closeOverlay(); // Toggle the state
896
- }}
897
- style={{
898
- // flex: 1,
899
- justifyContent: 'flex-end',
900
- alignItems: 'flex-end',
901
- borderWidth: 0,
902
- borderRadius: 15,
903
- }}
904
- >
905
- <HOCIcons.FontAwesome5 name="angle-double-down" size={20} color="darkblue" style={{ marginHorizontal: normalize(10) }} />
906
- </TouchableOpacity>
907
- </View>
908
- <View style={{ flex: 1 }}>
909
-
910
- <View style={{ marginTop: normalize(7) }}>
911
- <SSearch
912
- disabled={false}
913
- editable={true}
914
- dropdownapi={`insurance/emrcommonget/rnddhosudatefilter 1`}
915
- disablesearchcomponent={true}
916
- onChangeData={val => val && getFilter(val)}
917
- />
918
- </View>
919
-
920
- {DateView ?
921
- <View style={{ flexDirection: 'row', width: '100%', justifyContent: 'space-evenly', marginTop: normalize(7) }}>
922
- <View style={{ borderWidth: 0, width: '47%' }}>
923
- <SDatePickerLabel
924
- labeltext={'From Date'}
925
- icon={{
926
- 'icongroup': 5,
927
- 'name': 'calendar-alt',
928
- 'color': Global.AppTheme.primary_color,
929
- 'size': normalize(15),
930
- 'style': {
931
- marginHorizontal: normalize(5),
932
- }
933
- }}
934
- positionviewstyle={{
935
- position: 'absolute',
936
- top: normalize(-5),
937
- left: normalize(7),
938
- backgroundColor: 'white',
939
- flexDirection: 'row',
940
- alignItems: 'center'
941
- }}
942
- positiontextstyle={{
943
- color: Global.AppTheme.primary_color,
944
- fontSize: normalize(10),
945
- textAlign: 'left',
946
- fontWeight: 'normal'
947
- }}
948
- pickerstyle={{
949
- flexDirection: 'row',
950
- backgroundColor: '#fff',
951
- width: '100%',
952
- borderColor: 'grey',
953
- borderWidth: 0.5,
954
- borderRadius: 5,
955
- alignItems: 'center',
956
- height: normalize(30),
957
- elevation: 2,
958
- justifyContent: 'center',
959
- marginVertical: normalize(3)
960
- }}
961
- textstyle={{
962
- fontSize: normalize(12),
963
- color: "black",
964
- fontWeight: 'bold'
965
- }}
966
- // minimumdate={moment().format('YYYY-MM-DD')}
967
- maximumdate={moment().format('YYYY-MM-DD')}
968
- passingDate={criteriadate.fromdate}
969
- onChangeData={val => val == undefined ? null : (
970
- setCiteriaDate({
971
- "fromdate": moment(val).format('YYYY-MM-DD'),
972
- "todate": criteriadate.todate
973
- })
974
- )}
975
- />
976
- </View>
977
- <View style={{ borderWidth: 0, width: '47%' }}>
978
- <SDatePickerLabel
979
- labeltext={'To Date'}
980
- icon={{
981
- 'icongroup': 5,
982
- 'name': 'calendar-alt',
983
- 'color': Global.AppTheme.primary_color,
984
- 'size': normalize(15),
985
- 'style': {
986
- marginHorizontal: normalize(5)
987
- }
988
- }}
989
- positionviewstyle={{
990
- position: 'absolute',
991
- top: normalize(-5),
992
- left: normalize(7),
993
- backgroundColor: 'white',
994
- flexDirection: 'row',
995
- alignItems: 'center'
996
- }}
997
- positiontextstyle={{
998
- color: Global.AppTheme.primary_color,
999
- fontSize: normalize(10),
1000
- textAlign: 'left',
1001
- fontWeight: 'normal'
1002
- }}
1003
- pickerstyle={{
1004
- flexDirection: 'row',
1005
- backgroundColor: '#fff',
1006
- width: '100%',
1007
- borderColor: 'grey',
1008
- borderWidth: 0.5,
1009
- borderRadius: 5,
1010
- alignItems: 'center',
1011
- height: normalize(30),
1012
- elevation: 2,
1013
- justifyContent: 'center',
1014
- marginVertical: normalize(3)
1015
- }}
1016
- textstyle={{
1017
- fontSize: normalize(12),
1018
- color: "black",
1019
- fontWeight: 'bold'
1020
- }}
1021
- // minimumdate={moment().format('YYYY-MM-DD')}
1022
- maximumdate={moment().format('YYYY-MM-DD')}
1023
- passingDate={criteriadate.todate}
1024
- onChangeData={val => val == undefined ? null : (
1025
- setCiteriaDate({
1026
- "fromdate": criteriadate.fromdate,
1027
- "todate": moment(val).format('YYYY-MM-DD')
1028
- })
1029
- )}
1030
- />
1031
- </View>
1032
- </View>
1033
- : null}
1034
-
1035
- <View style={{ flexDirection: 'row', width: '100%' }}>
1036
-
1037
- <View style={{ flexDirection: 'row', borderWidth: 0.5, borderRadius: 0, borderColor: 'lightgrey', alignItems: 'center', marginTop: normalize(10), marginBottom: normalize(7), marginHorizontal: normalize(7) }}>
1038
-
1039
- <TouchableOpacity
1040
- onPress={() => {
1041
- TreatmentTypeFunction(criteriainfo, 1)
1042
- }}
1043
- style={{
1044
- borderRadius: 10,
1045
- borderWidth: 0.5,
1046
- height: normalize(40),
1047
- // width: normalize(40),
1048
- borderColor: 'lightblue',
1049
- justifyContent: 'center',
1050
- alignItems: 'center',
1051
- elevation: 2,
1052
- margin: normalize(4),
1053
- paddingHorizontal: normalize(4),
1054
- backgroundColor: criteriainfo.consultation == 1 ? Global.AppTheme.selected_color : 'white'
1055
- }}>
1056
- <HOCIcons.FontAwesome5
1057
- name={'hospital-user'}
1058
- size={normalize(20)}
1059
- color={Global.AppTheme.primary_color}
1060
- />
1061
- <Text adjustsFontSizeToFit style={{ fontSize: normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color, textAlign: 'center' }}>CONSULTATION</Text>
1062
- </TouchableOpacity>
1063
-
1064
- <TouchableOpacity
1065
- onPress={() => {
1066
- TreatmentTypeFunction(criteriainfo, 2)
1067
- }}
1068
- style={{
1069
- borderRadius: 10,
1070
- borderWidth: 0.5,
1071
- height: normalize(40),
1072
- // width: normalize(40),
1073
- borderColor: 'lightblue',
1074
- justifyContent: 'center',
1075
- alignItems: 'center',
1076
- elevation: 2,
1077
- margin: normalize(4),
1078
- paddingHorizontal: normalize(4),
1079
- backgroundColor: criteriainfo.admission == 1 ? Global.AppTheme.selected_color : 'white'
1080
- }}>
1081
- <HOCIcons.FontAwesome5
1082
- name={'bed'}
1083
- size={normalize(20)}
1084
- color={Global.AppTheme.primary_color}
1085
- />
1086
- <Text adjustsFontSizeToFit style={{ fontSize: normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color, textAlign: 'center' }}>ADMISSION</Text>
1087
- </TouchableOpacity>
1088
-
1089
- {(criteriainfo.admission == 1 && criteriainfo.consultation == 0) || (criteriainfo.consultation == 1 && criteriainfo.admission == 0) ?
1090
- <TouchableOpacity
1091
- onPress={() => {
1092
- TreatmentTypeFunction(criteriainfo, 3)
1093
- }}
1094
- style={{
1095
- borderRadius: 10,
1096
- borderWidth: 0.5,
1097
- height: normalize(40),
1098
- // width: normalize(40),
1099
- borderColor: 'lightblue',
1100
- justifyContent: 'center',
1101
- alignItems: 'center',
1102
- elevation: 2,
1103
- margin: normalize(4),
1104
- paddingHorizontal: normalize(4),
1105
- backgroundColor: criteriainfo.current == 1 ? Global.AppTheme.selected_color : 'white'
1106
- }}>
1107
- <HOCIcons.MaterialCommunityIcons
1108
- name={'clock-check-outline'}
1109
- size={normalize(20)}
1110
- color={Global.AppTheme.primary_color}
1111
- />
1112
- <Text adjustsFontSizeToFit style={{ fontSize: normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color, textAlign: 'center' }}>CURRENT</Text>
1113
- </TouchableOpacity>
1114
- : null}
1115
-
1116
- <Text style={{
1117
- position: 'absolute',
1118
- backgroundColor: 'white',
1119
- top: normalize(-5),
1120
- left: normalize(10),
1121
- fontSize: normalize(11),
1122
- fontWeight: 'normal',
1123
- color: Global.AppTheme.primary_color
1124
- }}>
1125
- {" Treatment Type "}
1126
- </Text>
1127
- </View>
1128
-
1129
- <View style={{ flexDirection: 'row', flexWrap: 'wrap', padding: normalize(5), paddingTop: normalize(7), borderRadius: 0, borderWidth: 0.5, borderColor: 'lightgrey', alignItems: 'center', marginTop: normalize(10), marginBottom: normalize(7) }}>
1130
-
1131
- {isBNUL(FormatType) ?
1132
-
1133
- FormatType.map((val) => {
1134
- return (
1135
- <TouchableOpacity
1136
- onPress={() => {
1137
- if (val.datavalue == criteriainfo.formattype) {
1138
- ChangeFormatType(criteriafornature, val);
1139
-
1140
- }
1141
- else {
1142
- criteriainfo.formattype = val.datavalue;
1143
- ChangeFormatType(criteriafornature, val);
1144
- setRefresh(refresh + 1);
1145
- }
1146
- }}
1147
- style={{
1148
- borderRadius: 10,
1149
- borderWidth: 0.5,
1150
- height: normalize(45),
1151
- // width: normalize(40),
1152
- borderColor: 'lightblue',
1153
- justifyContent: 'center',
1154
- alignItems: 'center',
1155
- elevation: 2,
1156
- margin: normalize(4),
1157
- paddingHorizontal: normalize(6),
1158
- backgroundColor: val.datavalue == criteriainfo.formattype ? Global.AppTheme.selected_color : 'white'
1159
- }}>
1160
- <HOCIcons.Icons
1161
- icongroup={val.icongroup ? val.icongroup : 3}
1162
- name={val.icon ? val.icon : 'file'}
1163
- size={normalize(20)}
1164
- color={Global.AppTheme.primary_color}
1165
- />
1166
- <Text adjustsFontSizeToFit style={{ fontSize: normalize(8), paddingVertical: normalize(4), fontWeight: 'bold', color: Global.AppTheme.primary_color, textAlign: 'center' }}>{val.displayvalue ? val.displayvalue : null}</Text>
1167
- </TouchableOpacity>
1168
- )
1169
- })
1170
- : null}
1171
-
1172
- <Text style={{
1173
- position: 'absolute',
1174
- backgroundColor: 'white',
1175
- top: normalize(-4),
1176
- left: normalize(10),
1177
- fontSize: normalize(11),
1178
- color: Global.AppTheme.primary_color
1179
- }}>
1180
- {" Format Type "}
1181
- </Text>
1182
- </View>
1183
- </View>
1184
-
1185
- {isBNUL(criteriafornature) ?
1186
-
1187
- <View style={{ flex: 1 }}>
1188
- <View style={{ width: '100%', justifyContent: 'space-evenly', alignItems: 'flex-start', marginVertical: normalize(5), flexDirection: 'row' }}>
1189
- <View style={{ width: '85%', justifyContent: 'center', alignItems: 'center' }}>
1190
- <View style={{ width: '95%', justifyContent: 'center' }}>
1191
- <CCustomTextInput
1192
- required={false}
1193
- info={"Enter Nature."}
1194
- custompositiontextviewstyle={{
1195
- position: 'absolute',
1196
- top: normalize(-5),
1197
- left: normalize(7),
1198
- flexDirection: 'row',
1199
- alignItems: 'center',
1200
- backgroundColor: 'white'
1201
- }}
1202
- inputstyle={{
1203
- flexDirection: 'row',
1204
- borderWidth: 0.5,
1205
- borderColor: 'lightgrey',
1206
- borderRadius: 5,
1207
- alignItems: 'center',
1208
- height: normalize(35),
1209
- backgroundColor: 'white',
1210
- elevation: 0
1211
- }}
1212
- iconstyle={{
1213
- icongroup: 4,
1214
- iconname: "file-text-o",
1215
- iconsize: normalize(18),
1216
- iconcolor: '#164c92',
1217
- style: {
1218
- paddingHorizontal: normalize(7)
1219
- }
1220
- }}
1221
- data={{
1222
- displaytext: ' Nature ',
1223
- type: 'default',
1224
- iconcolor: 'darkblue',
1225
- editable: true,
1226
- itemwidth: '100%',
1227
- iconname: 'id-badge',
1228
- value: isNUQ(searchNature) ? searchNature : null,
1229
- tfontweight: isNUQ(searchNature) ? 'bold' : 'bold',
1230
- placeholder: 'Search nature',
1231
- placeholdercolor: 'lightgrey',
1232
- capitalize: 'characters',
1233
- tfontsize: normalize(14)
1234
- }}
1235
- callBack={val => (val == undefined ? null : (
1236
- setSearchNature(val)
1237
- ))}
1238
- CloseIcon={isNUQ(searchNature) ? true : false}
1239
- CloseCallBack={val => (val == undefined ? null : (
1240
- setSearchNature('')
1241
- ))}
1242
- />
1243
- </View>
1244
- </View>
1245
- <View style={{ width: '15%', justifyContent: 'center', borderWidth: 0, alignItems: 'center' }}>
1246
- <TouchableOpacity
1247
- onPress={() => {
1248
- CheckAllSelected(criteriafornature) ?
1249
- SelectDeselectNature(0) : SelectDeselectNature(1)
1250
- }}
1251
- style={{
1252
- borderRadius: 5,
1253
- borderWidth: 0.5,
1254
- height: normalize(35),
1255
- width: '95%',
1256
- borderColor: 'lightblue',
1257
- justifyContent: 'center',
1258
- alignItems: 'center',
1259
- elevation: 2,
1260
- backgroundColor: 'white'
1261
- }}>
1262
- <HOCIcons.Icons
1263
- icongroup={13}
1264
- name={CheckAllSelected(criteriafornature) ? 'toggle-on' : 'toggle-off'}
1265
- size={normalize(20)}
1266
- color={CheckAllSelected(criteriafornature) ? 'green' : '#646464'}
1267
- />
1268
- {/* <Text adjustsFontSizeToFit style={{ fontSize: normalize(8), color: Global.AppTheme.primary_color, textAlign: 'center' }}>{'Select All'}</Text> */}
1269
- <Text adjustsFontSizeToFit style={{ fontSize: normalize(10), lineHeight: normalize(8), color: Global.AppTheme.primary_color, textAlign: 'center', fontWeight: 'bold' }}>{CheckAllSelectedCount(criteriafornature)}{"/"}{criteriafornature.length}{""}</Text>
1270
- </TouchableOpacity>
1271
- </View>
1272
- </View>
1273
-
1274
- <View style={{ flex: 1, borderWidth: 0, width: '100%' }}>
1275
- {RenderFlashList(criteriafornature)}
1276
- </View>
1277
- </View>
1278
- : null}
1279
- </View>
1280
- <CFooterView style={{ backgroundColor: '#f0f0f0' }}>
1281
- <View style={{ width: normalize(55) }}>
1282
- <CAwesomeButton
1283
- callback={() => {
1284
-
1285
- if (isNU(criteriainfo)) {
1286
- if (criteriainfo.treatmenttype == 6) {
1287
- notifyMessage('Please Select Any Treatment Type.');
1288
- }
1289
- else if (criteriainfo.treatmenttype == 7) {
1290
- notifyMessage('Please Select Any Treatment Type.');
1291
- }
1292
- else {
1293
- closeOverlay();
1294
- getChartData(criteriainfo, criteriadate, criteriafornature, false);
1295
- }
1296
- }
1297
-
1298
- }}
1299
- buttonstyle={{
1300
- 'borderRadius': 10,
1301
- 'borderWidth': 0.5,
1302
- 'height': normalize(45),
1303
- 'width': '100%',
1304
- 'backgroundColor': '#f2f3ff',
1305
- 'paddingHorizontal': 0,
1306
- 'raiseLevel': 1,
1307
- 'paddingBottom': 0,
1308
- 'borderColor': 'lightblue',
1309
- 'paddingTop': 0,
1310
- 'style': {
1311
- margin: 5,
1312
- }
1313
- }}
1314
- viewstyle={{
1315
- borderWidth: 0,
1316
- borderRadius: 0,
1317
- justifyContent: 'center',
1318
- alignItems: 'center'
1319
- }}
1320
- icon={{
1321
- 'icongroup': 1,
1322
- 'name': 'select1',
1323
- 'color': Global.AppTheme.primary_color,
1324
- 'size': normalize(25),
1325
- 'style': {
1326
- textAlign: 'center'
1327
- }
1328
- }}
1329
- text={{
1330
- fontSize: normalize(9),
1331
- // lineHeight:normalize(10),
1332
- fontWeight: 'bold',
1333
- color: Global.AppTheme.primary_color,
1334
- textAlign: 'center'
1335
- }}
1336
- displaytext={'GENERATE'}
1337
- />
1338
- </View>
1339
- </CFooterView>
1340
- </View>
1341
- </CModalOverlay>
1342
- : null}
1343
-
1344
- {!isLoading && !isBNUL(criteriafornature) ?
1345
- <View style={{ justifyContent: 'center', alignItems: 'center', flex: 1 }}>
1346
- <TouchableOpacity
1347
- onPress={() => {
1348
- getNatureData();
1349
- }}
1350
- style={{ backgroundColor: 'white', padding: normalize(10), borderRadius: 10, elevation: 2, borderLeftWidth: 2, borderBottomWidth: 2, borderColor: 'grey' }}>
1351
- <Text style={{ color: Global.AppTheme.primary_color, fontWeight: 'normal', fontSize: normalize(12), textAlign: 'center' }}>{"Data not found\nPlease try again"}</Text>
1352
- {/* <Button title="Try Again" onPress={() => { getNatureData()}} /> */}
1353
- </TouchableOpacity>
1354
- </View>
1355
- : null}
1356
-
1357
-
1358
- </View>
1359
- </CDetailView>
1360
-
1361
- <View
1362
- style={[{ paddingVertical: 5, justifyContent: 'center', backgroundColor: 'white', borderTopWidth: 1, borderTopColor: 'lightgrey', width: '100%' }]}
1363
- >
1364
-
1365
- <View style={{ flexDirection: 'row', justifyContent: 'space-between', borderWidth: 0, width: '100%' }}>
1366
- {[
1367
- {
1368
- "displaytext": "Criteria",
1369
- "fontcolor": Global.AppTheme.primary_color,
1370
- "shadowcolor": "#fff",
1371
- "size": 10,
1372
- "icongroup": 5,
1373
- "iconname": "list-alt",
1374
- "iconcolor": Global.AppTheme.primary_color,
1375
- "selected": false,
1376
- "visibility": isBNUL(criteriafornature) ? true : false,
1377
- "iconsize": 20,
1378
- "functionid": "CS04",
1379
- "buttontype": 'button'
1380
- },
1381
- // {
1382
- // "displaytext": "Download",
1383
- // "fontcolor": Global.AppTheme.primary_color,
1384
- // "shadowcolor": "#fff",
1385
- // "size": 10,
1386
- // "icongroup": 5,
1387
- // "iconname": "download",
1388
- // "iconcolor": Global.AppTheme.primary_color,
1389
- // "selected": false,
1390
- // "visibility": isBNUL(HtmlData) ? true : false,
1391
- // "iconsize": 20,
1392
- // "functionid": "CS01"
1393
- // },
1394
- ]
1395
- .map((item, i) => {
1396
- return (
1397
- item.visibility ?
1398
-
1399
- item.buttontype == 'more' ?
1400
-
1401
- <Menu key={i}>
1402
- <MenuTrigger
1403
- customStyles={{
1404
- triggerWrapper: {
1405
- borderWidth: 0,
1406
- justifyContent: 'flex-start',
1407
- alignItems: 'flex-start'
1408
- }
1409
- }}
1410
- >
1411
- <HShadowButton
1412
- useicon={true}
1413
- usetext={true}
1414
- disabled={true}
1415
- buttonstyle={{
1416
- ...CButtonShadow(),
1417
- alignItems: 'center',
1418
- justifyContent: 'center',
1419
- borderWidth: 1,
1420
- borderColor: 'lightblue',
1421
- borderRadius: 10,
1422
- height: normalize(40),
1423
- width: normalize(60),
1424
- marginVertical: normalize(7),
1425
- backgroundColor: 'white'
1426
- }}
1427
- iconcolor={Global.AppTheme.primary_color}
1428
- icongroup={3}
1429
- iconname={'dots-horizontal-circle-outline'}
1430
- iconsize={normalize(24)}
1431
- displaytext={'More'}
1432
- buttonCallback={() => {
1433
-
1434
- }}
1435
- textstyle={{
1436
- color: Global.AppTheme.primary_color,
1437
- fontSize: normalize(9),
1438
- textAlign: 'center',
1439
- alignSelf: 'center'
1440
- }}
1441
- />
1442
- {/* <View style={{ marginHorizontal: normalize(7) }}>
1443
- <View style={{
1444
- borderRadius: 10,
1445
- borderWidth: 0.5,
1446
- height: normalize(40),
1447
- width: normalize(60),
1448
- backgroundColor: '#f2f3ff',
1449
- paddingHorizontal: 0,
1450
- elevation: 2,
1451
- paddingBottom: 0,
1452
- borderColor: 'lightblue',
1453
- justifyContent: 'center',
1454
- alignItems: 'center',
1455
- margin: 5
1456
- }}>
1457
- <HOCIcons.MaterialCommunityIcons
1458
- name={'dots-horizontal-circle-outline'}
1459
- size={normalize(20)}
1460
- color={Global.AppTheme.primary_color}
1461
- style={{
1462
- paddingHorizontal: normalize(3)
1463
- }}
1464
- />
1465
- <Text style={{ fontSize: normalize(7), color: Global.AppTheme.primary_color, fontWeight: 'normal' }}>{'More'}</Text>
1466
- </View>
1467
- </View> */}
1468
- </MenuTrigger>
1469
- <MenuOptions
1470
- optionsContainerStyle={{ marginTop: normalize(-45), backgroundColor: '#ffffff00' }}
1471
- customStyles={{
1472
- optionsContainer: {
1473
- shadowColor: '#00000044',
1474
- shadowRadius: 0,
1475
- borderRadius: 5,
1476
- borderWidth: 0,
1477
- padding: normalize(5),
1478
- borderColor: 'lightgrey',
1479
- elevation: 2,
1480
- width: '80%',
1481
- backgroundColor: 'white'
1482
- },
1483
- optionText: {},
1484
- }}>
1485
- <View style={{ flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'flex-end' }}>
1486
- {isBNUL(item.morearray) ? item.morearray.map((item) => {
1487
- return (
1488
- <View style={{ marginHorizontal: normalize(7) }}>
1489
-
1490
- {buttonView(item, 50)}
1491
- </View>
1492
- )
1493
- }) : null}
1494
- </View>
1495
- </MenuOptions>
1496
- </Menu>
1497
-
1498
- :
1499
- <View style={{ marginHorizontal: normalize(7) }}>
1500
- {buttonView(item, 60)}
1501
- </View>
1502
- : null
1503
- )
1504
- })}
1505
- </View>
1506
- </View>
1507
- </CContainerView>
1508
- )
1509
- };
1510
-
1511
- export default ChartScreenNew;
1512
-
1513
- const styles = StyleSheet.create({
1514
- footerButton: {
1515
- shadowColor: '#000',
1516
- shadowOffset: {
1517
- width: 0,
1518
- height: 2,
1519
- },
1520
- shadowOpacity: 0.25,
1521
- shadowRadius: 3.84,
1522
- elevation: 5,
1523
- alignItems: 'center',
1524
- justifyContent: 'center',
1525
- borderWidth: 1,
1526
- borderColor: 'lightblue',
1527
- borderRadius: 10,
1528
- height: Dimensions.get('screen').height * 0.055,
1529
- width: Dimensions.get('screen').height * 0.065,
1530
- marginVertical: normalize(7),
1531
- backgroundColor: 'white',
1532
- },
1533
- footerButtonText: {
1534
- fontSize: normalize(9),
1535
- textAlign: 'center',
1536
- alignSelf: 'center',
1537
- },
1538
- moreButtonContainer: {
1539
- borderWidth: 0,
1540
- },
1541
- menuOptions: {
1542
- marginTop: normalize(-52),
1543
- },
1544
- moreOptionsContainer: {
1545
- flexDirection: 'row',
1546
- flexWrap: 'wrap-reverse',
1547
- justifyContent: 'flex-end',
1548
- borderWidth: 0,
1549
- },
1550
- menuOption: {
1551
- marginHorizontal: normalize(3),
1552
- },
1553
- subFooterButton: {
1554
- shadowColor: '#000',
1555
- shadowOffset: {
1556
- width: 0,
1557
- height: 2,
1558
- },
1559
- shadowOpacity: 0.25,
1560
- shadowRadius: 3.84,
1561
- elevation: 5,
1562
- alignItems: 'center',
1563
- justifyContent: 'center',
1564
- borderWidth: 1,
1565
- borderColor: 'lightblue',
1566
- borderRadius: 10,
1567
- height: normalize(40),
1568
- width: normalize(50),
1569
- marginVertical: normalize(7),
1570
- backgroundColor: 'white',
1571
- },
1572
- optionText: {
1573
- fontSize: normalize(8),
1574
- color: Global.AppTheme.primary_color,
1575
- fontWeight: 'bold',
1576
- textAlign: 'center',
1577
- maxWidth: normalize(60),
1578
- }
1579
- })