@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.
- package/dist/Common/ErrorBoundary.d.ts +15 -0
- package/dist/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/Common/ErrorBoundary.js +64 -0
- package/dist/Common/ErrorBoundary.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Common/ErrorBoundary.d.ts +15 -0
- package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/Common/ErrorBoundary.js +64 -0
- package/dist/src/Common/ErrorBoundary.js.map +1 -0
- package/package.json +17 -5
- package/.gitattributes +0 -2
- package/index.d.ts +0 -66
- package/index.js +0 -66
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- package/src/Common/ErrorBoundary.tsx +0 -73
- package/src/Common/Icons.js +0 -49
- package/src/Common/NetworkServiceCall.js +0 -265
- package/src/CommonStyle/CommonTheme.js +0 -11
- package/src/CommonStyle/ComponentFunctions.js +0 -632
- package/src/CommonStyle/PopupStyle.js +0 -146
- package/src/CommonStyle/commonStyle.js +0 -93
- package/src/CommonStyle/componentStyle.js +0 -545
- package/src/CommonStyle/optionListStyles.js +0 -175
- package/src/Components/ByProductPage.js +0 -200
- package/src/Components/CDropDownListNew.js +0 -153
- package/src/Components/CSupplierList.js +0 -88
- package/src/Components/CVerificationCard.js +0 -2822
- package/src/Components/CustomButton.js +0 -67
- package/src/Components/CustomCard.js +0 -127
- package/src/Components/CustomTextInput.js +0 -47
- package/src/Components/EquipmentPage.js +0 -313
- package/src/Components/FilterInput.Copy.js +0 -723
- package/src/Components/FilterInput.js +0 -569
- package/src/Components/HSubHeading.js +0 -68
- package/src/Components/HeaderCard.js +0 -40
- package/src/Components/MoreOptionsScreen.js +0 -251
- package/src/Components/NonSwipableProductCard.js +0 -226
- package/src/Components/NonSwipableSupplierCard.js +0 -348
- package/src/Components/ProductCard.js +0 -1336
- package/src/Components/QualityProductCard.js +0 -1059
- package/src/Components/RateProductCard.js +0 -1452
- package/src/Components/RawMaterial.js +0 -261
- package/src/Components/SDropDownEdited.js +0 -549
- package/src/Components/SDropDownNew.js +0 -529
- package/src/Components/SHelpDescription.js +0 -147
- package/src/Components/STextInputNew.js +0 -510
- package/src/Components/SearchProductCard.js +0 -470
- package/src/Components/StageByProduct.js +0 -199
- package/src/Components/SupplierCard.js +0 -243
- package/src/Components/SupplierInvoiceCard.js +0 -405
- package/src/Components/SwipableSupplierCard.js +0 -136
- package/src/Components/TagTemplate.js +0 -74
- package/src/Components/WrappedComponent.js +0 -25
- package/src/Custom/CBooking.js +0 -944
- package/src/Custom/CBookingPostpone.js +0 -1822
- package/src/Custom/CCalendar.js +0 -560
- package/src/Custom/CCard.js +0 -880
- package/src/Custom/CDetailCard.js +0 -205
- package/src/Custom/CHelpImage.js +0 -52
- package/src/Custom/CReport.js +0 -569
- package/src/Custom/CScrollView.js +0 -73
- package/src/Custom/CSignature.js +0 -112
- package/src/Custom/CSliderMenu.js +0 -339
- package/src/Custom/CSupplierCard.js +0 -99
- package/src/Custom/CTemplateCard.js +0 -438
- package/src/Custom/CTokenAllocation.js +0 -1402
- package/src/Custom/CTokenListOverlay.js +0 -122
- package/src/Custom/CWardStatus.js +0 -444
- package/src/Custom/Charts/CBarChart.js +0 -218
- package/src/Custom/Charts/CDashBoardList.js +0 -133
- package/src/Custom/Charts/CDashBoardTable.js +0 -172
- package/src/Custom/Charts/CLineChart.js +0 -193
- package/src/Custom/Charts/CPieChart.js +0 -186
- package/src/Custom/Loader.js +0 -182
- package/src/Custom/OUserView.js +0 -1121
- package/src/Custom/PreviewDosage.js +0 -115
- package/src/Custom/SearchLoader.js +0 -32
- package/src/Custom/TableComponent/CActivityTable.js +0 -707
- package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
- package/src/Custom/TableComponent/CTable.js +0 -185
- package/src/Custom/TableComponent/CTextBody.js +0 -40
- package/src/Custom/TableComponent/CTextHeader.js +0 -17
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
- package/src/Custom/TableComponent/SDropdownTable.js +0 -491
- package/src/Custom/TableComponent/TagTable.js +0 -1200
- package/src/CustomComponents/CAddColumn.js +0 -140
- package/src/CustomComponents/CAssessmentDelete.js +0 -307
- package/src/CustomComponents/CAwesomeButton.js +0 -83
- package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
- package/src/CustomComponents/CBackHandler.js +0 -273
- package/src/CustomComponents/CCalendar.js +0 -243
- package/src/CustomComponents/CCommentOverlay.js +0 -202
- package/src/CustomComponents/CComments.js +0 -162
- package/src/CustomComponents/CContainerView.js +0 -24
- package/src/CustomComponents/CCustomTextInput.js +0 -336
- package/src/CustomComponents/CDetailView.js +0 -40
- package/src/CustomComponents/CDropDownList.js +0 -153
- package/src/CustomComponents/CDropdownSelect.js +0 -555
- package/src/CustomComponents/CFooterView.js +0 -42
- package/src/CustomComponents/CImagePickerSave.js +0 -316
- package/src/CustomComponents/CModalOverlay.js +0 -91
- package/src/CustomComponents/CNetworkStatus.js +0 -327
- package/src/CustomComponents/CNotesInstructions.js +0 -1000
- package/src/CustomComponents/COverlay.js +0 -81
- package/src/CustomComponents/CRemarks.js +0 -176
- package/src/CustomComponents/CRowAdd.js +0 -143
- package/src/CustomComponents/CSummaryDropDown.js +0 -327
- package/src/CustomComponents/CText.js +0 -9
- package/src/CustomComponents/CVectorIcon.js +0 -34
- package/src/CustomComponents/HtmlContentViewer.js +0 -65
- package/src/CustomComponents/PdfContentViewer.js +0 -90
- package/src/CustomComponents/SDropDownDosage.js +0 -1087
- package/src/CustomComponents/SwipableProductCard.js +0 -246
- package/src/CustomComponents/SwipableProductImageCard.js +0 -254
- package/src/CustomComponents/WorkOrderDetails.js +0 -1216
- package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
- package/src/HOC/ConfirmOverlay.js +0 -192
- package/src/HOC/HHeading.js +0 -70
- package/src/HOC/HMoreButton.js +0 -88
- package/src/HOC/HNatureHeading.js +0 -402
- package/src/HOC/HOCIcons.js +0 -80
- package/src/HOC/HOverlayCentered.js +0 -140
- package/src/HOC/HShadowButton.js +0 -45
- package/src/HOC/HShadowCountButton.js +0 -82
- package/src/HOC/OptionOverlay.js +0 -48
- package/src/Json/Chart.json +0 -818
- package/src/Json/Consultation.json +0 -622
- package/src/Json/CreditBill.json +0 -490
- package/src/Json/Dropdown.json +0 -216
- package/src/Json/DropdownConsultation.json +0 -228
- package/src/Json/DynamicReports.json +0 -623
- package/src/Json/Footer.json +0 -79
- package/src/Media/AudioScreen.js +0 -342
- package/src/Media/BarcodeScan.js +0 -145
- package/src/Media/CAudioPlay.js +0 -228
- package/src/Media/CCaptureImageWithoutEdit.js +0 -330
- package/src/Media/CImageGallery.js +0 -289
- package/src/Media/CImageZoom.js +0 -82
- package/src/Media/CSingleImage.js +0 -391
- package/src/Media/CSketchCanvas.js +0 -76
- package/src/Media/CVideoPlay.js +0 -31
- package/src/Media/DocumentScreen.js +0 -362
- package/src/Media/DrawingScreen.js +0 -578
- package/src/Media/ImageScreen.js +0 -309
- package/src/Media/RecordAudio.js +0 -250
- package/src/Media/RecordVideo.js +0 -223
- package/src/Media/VideoScreen.js +0 -378
- package/src/Navigation/PageNavigation.js +0 -224
- package/src/Navigation/useFocusEffect.js +0 -2
- package/src/Navigation/useFocusEffect.native.js +0 -1
- package/src/Navigation/useFocusEffect.web.js +0 -1
- package/src/Navigation/useIsFocused.js +0 -1
- package/src/Navigation/useIsFocused.native.js +0 -1
- package/src/Navigation/useIsFocused.web.js +0 -1
- package/src/Navigation/useNavigation.js +0 -2
- package/src/Navigation/useNavigation.native.js +0 -1
- package/src/Navigation/useNavigation.web.js +0 -1
- package/src/Screens/CMedications.js +0 -528
- package/src/Screens/CWebViewGallery.js +0 -203
- package/src/Screens/ChartScan.js +0 -279
- package/src/Screens/ChartScreenNew.js +0 -1579
- package/src/Screens/Consultation.js +0 -1500
- package/src/Screens/Dashboard.js +0 -778
- package/src/Screens/FileExplorer.js +0 -288
- package/src/Screens/Footer.js +0 -340
- package/src/Screens/ForgotPassword.js +0 -288
- package/src/Screens/HeaderBlock.js +0 -353
- package/src/Screens/Login.js +0 -328
- package/src/Screens/Notification.js +0 -149
- package/src/Screens/OcrScreen.js +0 -20
- package/src/Screens/PdfPreview.js +0 -507
- package/src/Screens/RegistrationDetails.js +0 -467
- package/src/Screens/SearchScreen.js +0 -582
- package/src/Screens/Splash.js +0 -788
- package/src/Screens/SwipeLeftView.js +0 -1867
- package/src/StaticComponents/SAlphabet.js +0 -47
- package/src/StaticComponents/SCheckBox.js +0 -42
- package/src/StaticComponents/SDatePicker.js +0 -208
- package/src/StaticComponents/SDatePickerLabel.js +0 -253
- package/src/StaticComponents/SDatePickerNew.js +0 -258
- package/src/StaticComponents/SDateTimePickerNew.js +0 -381
- package/src/StaticComponents/SDropDownGenerate.js +0 -450
- package/src/StaticComponents/SDropDownHoc.js +0 -636
- package/src/StaticComponents/SDropDownIcon.js +0 -500
- package/src/StaticComponents/SMenuBox.js +0 -131
- package/src/StaticComponents/SOverlay.js +0 -177
- package/src/StaticComponents/SOverlayTextInput.js +0 -109
- package/src/StaticComponents/SSearch.js +0 -438
- package/src/StaticComponents/SSearchBar.js +0 -53
- package/src/StaticComponents/SSpeedDial.js +0 -303
- package/src/StaticComponents/STextInput.js +0 -289
- package/src/StaticComponents/STextInputProps.js +0 -36
- package/src/StaticComponents/STimePicker.js +0 -171
- package/src/StaticComponents/STimingDropDownNew.js +0 -1585
- package/src/StaticComponents/STimingSwitch.js +0 -34
- package/src/layout/CContainerView.js +0 -21
- package/src/layout/CDetailView.js +0 -81
- package/src/layout/HeaderBlock.js +0 -353
- package/src/layout/INVLoginLayout.js +0 -657
- package/src/layout/Loader.js +0 -176
|
@@ -1,1087 +0,0 @@
|
|
|
1
|
-
import React, { useState, useContext, useEffect } from 'react';
|
|
2
|
-
import { TouchableOpacity, StyleSheet, View, TouchableHighlight, Text, Image, TextInput, ScrollView, FlatList, Touchable } from 'react-native';
|
|
3
|
-
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
|
4
|
-
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
-
import { colors } from '../CommonStyle/commonStyle';
|
|
6
|
-
import Overlay from 'react-native-modal-overlay';
|
|
7
|
-
import {
|
|
8
|
-
getListviewItem,
|
|
9
|
-
getListviewItemText,
|
|
10
|
-
getPopupHeadingOptionText,
|
|
11
|
-
} from '../CommonStyle/PopupStyle';
|
|
12
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
13
|
-
import Dropdown from '../Json/Dropdown.json';
|
|
14
|
-
import Entypo from 'react-native-vector-icons/Entypo';
|
|
15
|
-
import Ionicons from 'react-native-vector-icons/Ionicons';
|
|
16
|
-
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
17
|
-
import { Dimensions } from 'react-native';
|
|
18
|
-
import SearchLoader from '../Custom/SearchLoader';
|
|
19
|
-
import { notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
20
|
-
import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
|
|
21
|
-
import FontAwesome from 'react-native-vector-icons/FontAwesome';
|
|
22
|
-
import SDropDownNew from '../StaticComponents/SDropDownNew';
|
|
23
|
-
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
24
|
-
import STimePicker from '../StaticComponents/STimePicker';
|
|
25
|
-
import SCheckBox from '../StaticComponents/SCheckBox';
|
|
26
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
27
|
-
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
28
|
-
|
|
29
|
-
var searchResult = [];
|
|
30
|
-
var tempvalue = [];
|
|
31
|
-
var DosageArray = [];
|
|
32
|
-
var ValueString = null;
|
|
33
|
-
const SDropDownDosage = (props) => {
|
|
34
|
-
const [isdropdownshow, setDropdownShow] = useState(false);
|
|
35
|
-
const [searchData, setSearchData] = useState('');
|
|
36
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
37
|
-
const [savevisibility, setSaveVisibility] = useState(true);
|
|
38
|
-
const [section, setSection] = useState(props.editable ? 1 : 2);
|
|
39
|
-
// console.log("EDITABLEEEEEEEEEEEEEEEEEE", JSON.stringify(section))
|
|
40
|
-
const [refresh, setRefresh] = useState(1);
|
|
41
|
-
const [selectedValue, setSelectedValue] = useState(props.value);
|
|
42
|
-
const [displayData, setDisplayData] = useState([]);
|
|
43
|
-
const [stage, setStage] = useState(false);
|
|
44
|
-
const [alphaindex, setAlphaIndex] = useState();
|
|
45
|
-
const [alphaFilter, setAlphaFilter] = useState(false);
|
|
46
|
-
const [filterPurpose, setFilterPurpose] = useState([]);
|
|
47
|
-
const [visibility, setVisibility] = useState(true);
|
|
48
|
-
const [object, setObject] = useState({
|
|
49
|
-
'description': '',
|
|
50
|
-
'volume': 0,
|
|
51
|
-
'unit': '',
|
|
52
|
-
'intake': 0,
|
|
53
|
-
'usagetype': 20,
|
|
54
|
-
'hosumrusagenature': 23,
|
|
55
|
-
'hosumrusagenaturedisplay': '',
|
|
56
|
-
'patientdescription': '',
|
|
57
|
-
'consultantdescription': '',
|
|
58
|
-
'medicationdescription': '',
|
|
59
|
-
'flag': 1,
|
|
60
|
-
'remarks': '',
|
|
61
|
-
'specifictime': false,
|
|
62
|
-
'timeprovided': '',
|
|
63
|
-
'editspecifictime': false,
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const [cloneobject, setCloneObject] = useState({
|
|
67
|
-
'description': '',
|
|
68
|
-
'descriptionedit': false,
|
|
69
|
-
'volume': 0,
|
|
70
|
-
'editvolume': false,
|
|
71
|
-
'unit': '',
|
|
72
|
-
'editunit': false,
|
|
73
|
-
'intake': 0,
|
|
74
|
-
'editintake': false,
|
|
75
|
-
'usagetype': 20,
|
|
76
|
-
'hosumrusagenature': 23,
|
|
77
|
-
'hosumrusagenaturedisplay': '',
|
|
78
|
-
'patientdescription': '',
|
|
79
|
-
'editpatientdescription': false,
|
|
80
|
-
'consultantdescription': '',
|
|
81
|
-
'editconsultantdescription': false,
|
|
82
|
-
'medicationdescription': '',
|
|
83
|
-
'editmedicationdescription': false,
|
|
84
|
-
'flag': 1,
|
|
85
|
-
'remarks': '',
|
|
86
|
-
'editremarks': false,
|
|
87
|
-
'specifictime': false,
|
|
88
|
-
'timeprovided': '',
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
useEffect(() => {
|
|
92
|
-
NetworkServiceCall('get', APIURL + 'emr/emrcommonget/rnladropdown 17', '')
|
|
93
|
-
.then(function (response) {
|
|
94
|
-
if (response.data.data != null &&
|
|
95
|
-
response.data.data != undefined) {
|
|
96
|
-
DosageArray = response.data.data;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
notifyMessage('Network Error', 2);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}, []);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
// console.log("......................", props.editable)
|
|
106
|
-
const [dropdowndata, setDropDownData] = useState(props.dropdowndata);
|
|
107
|
-
let flag = props.flagData ? props.flagData : 0;
|
|
108
|
-
function getOverlayScreenContainer() {
|
|
109
|
-
return ({
|
|
110
|
-
flexDirection: 'row',
|
|
111
|
-
margin: 10,
|
|
112
|
-
height: Dimensions.get('window').height * 0.045,
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
function FetchDropdownList(key) {
|
|
118
|
-
setSection(1);
|
|
119
|
-
setSearchData('');
|
|
120
|
-
setIsLoading(true);
|
|
121
|
-
setDropdownShow(true);
|
|
122
|
-
console.log('DROPDOWN AFTER SAVE', APIURL + props.dropdownapi);
|
|
123
|
-
NetworkServiceCall('get', APIURL + props.dropdownapi, '')
|
|
124
|
-
.then(function (response) {
|
|
125
|
-
if (response.data.data != null && response.data.data != undefined) {
|
|
126
|
-
searchResult = response;
|
|
127
|
-
setDisplayData(response.data.data.sort((a, b) => a.displayvalue.localeCompare(b.displayvalue)));
|
|
128
|
-
setIsLoading(false);
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
searchResult = [];
|
|
133
|
-
setDisplayData([]);
|
|
134
|
-
setIsLoading(false);
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function FetchList() {
|
|
140
|
-
setSearchData('');
|
|
141
|
-
setIsLoading(true);
|
|
142
|
-
setDropdownShow(true);
|
|
143
|
-
searchResult = { 'httpstatus': 200 };
|
|
144
|
-
setDisplayData(props.dropdownarray);
|
|
145
|
-
setIsLoading(false);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function getDropDownIntake(details) {
|
|
149
|
-
let dropdownvaluenew3;
|
|
150
|
-
Dropdown.Intake != null
|
|
151
|
-
? Dropdown.Intake.map(val => {
|
|
152
|
-
if (val.datavalue == details) {
|
|
153
|
-
dropdownvaluenew3 = val.displayvalue;
|
|
154
|
-
object.intake = val.datavalue;
|
|
155
|
-
}
|
|
156
|
-
})
|
|
157
|
-
: null;
|
|
158
|
-
return dropdownvaluenew3;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function EditDosage(params) {
|
|
162
|
-
// console.log("++++++++++++++++++++++++++++++++", JSON.stringify(props.completeData.dosage[0]))
|
|
163
|
-
setSection(2);
|
|
164
|
-
setSaveVisibility(false);
|
|
165
|
-
setDropdownShow(true);
|
|
166
|
-
setObject(props.completeData.dosage[0]);
|
|
167
|
-
// console.log("KKKKKKKKLLLLLLLLLHHHHHHHHHHH", JSON.stringify(object))
|
|
168
|
-
// let buttonapi = ""
|
|
169
|
-
// NetworkServiceCall("get", buttonapi, "")
|
|
170
|
-
// .then(function (response) {
|
|
171
|
-
// if (response.httpstatus == 200) {
|
|
172
|
-
|
|
173
|
-
// }
|
|
174
|
-
// else {
|
|
175
|
-
|
|
176
|
-
// }
|
|
177
|
-
// })
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function selection(item, changevalue, keycode) {
|
|
181
|
-
console.log('flaggggggggggggggg', item);
|
|
182
|
-
// flag == 1 ? (calenderResponseComponentData.tokenno = 0) : null
|
|
183
|
-
let dataset = {
|
|
184
|
-
'datavalue': item.datavalue,
|
|
185
|
-
'displayvalue': item.displayvalue,
|
|
186
|
-
'key': keycode,
|
|
187
|
-
};
|
|
188
|
-
setDropDownData(item.displayvalue);
|
|
189
|
-
props.onChangeData(item);
|
|
190
|
-
props.refreshCount(1);
|
|
191
|
-
// props.editStatus(1)
|
|
192
|
-
setDropdownShow(false);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function DropdownLayout() {
|
|
196
|
-
return (
|
|
197
|
-
<View style={layoutstyles.overlay_screen_container}>
|
|
198
|
-
{/* <View style={{ alignItems: 'center' }}> */}
|
|
199
|
-
{/* <Text style={{ fontSize: normalize(12), fontWeight: 'bold' }}> Select Option </Text> */}
|
|
200
|
-
{/* </View> */}
|
|
201
|
-
<View style={getOverlayScreenContainer()}>
|
|
202
|
-
<View
|
|
203
|
-
style={[ComponentStyles.searchTextbox_View,
|
|
204
|
-
layoutstyles.overlay_searchTextbox_View,
|
|
205
|
-
]}
|
|
206
|
-
>
|
|
207
|
-
<View style={layoutstyles.textinput_view}>
|
|
208
|
-
<TextInput
|
|
209
|
-
style={[ComponentStyles.searchTextbox]}
|
|
210
|
-
editable={true}
|
|
211
|
-
autoCapitalize={'characters'}
|
|
212
|
-
value={searchData}
|
|
213
|
-
onChangeText={text => setSearchData(text)}
|
|
214
|
-
secureTextEntry={false}
|
|
215
|
-
keyboardType={'default'}
|
|
216
|
-
placeholder="Search"
|
|
217
|
-
/>
|
|
218
|
-
|
|
219
|
-
</View>
|
|
220
|
-
<Image style={[ComponentStyles.searchIcon]}
|
|
221
|
-
source={{ uri: 'https://i.ibb.co/j8ywYpJ/search.png' }}
|
|
222
|
-
/>
|
|
223
|
-
|
|
224
|
-
</View>
|
|
225
|
-
</View>
|
|
226
|
-
<View style={getOverlayScreenChildcontainer()}>
|
|
227
|
-
{GetDropdown(alphaFilter ? filterPurpose : displayData)}
|
|
228
|
-
</View>
|
|
229
|
-
</View>
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
function getDosageUnit(details) {
|
|
234
|
-
let dropdownvaluenew4;
|
|
235
|
-
Global.DosageArray != null && Global.DosageArray != undefined
|
|
236
|
-
&& Global.DosageArray.length > 0
|
|
237
|
-
? Global.DosageArray.map(val => {
|
|
238
|
-
if (val.datavalue == parseInt(details)) {
|
|
239
|
-
dropdownvaluenew4 = val.displayvalue;
|
|
240
|
-
}
|
|
241
|
-
})
|
|
242
|
-
: null;
|
|
243
|
-
return dropdownvaluenew4;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function AddNewDosage(params) {
|
|
247
|
-
if (object.description != '' && object.volume != 0 && object.unit != '' && object.volume > 0) {
|
|
248
|
-
// let obj = {
|
|
249
|
-
// ...object,
|
|
250
|
-
// 'displayvalue': object.description
|
|
251
|
-
// }
|
|
252
|
-
|
|
253
|
-
let obj = {
|
|
254
|
-
'hosumrcode': object.hosumrcode,
|
|
255
|
-
'description': cloneobject.descriptionedit ? cloneobject.description : object.description,
|
|
256
|
-
'volume': cloneobject.editvolume ? parseFloat(cloneobject.volume) : object.volume,
|
|
257
|
-
'unit': cloneobject.editunit ? cloneobject.unit : object.unit,
|
|
258
|
-
'intake': cloneobject.editintake ? cloneobject.intake : object.intake,
|
|
259
|
-
'usagename': cloneobject.descriptionedit ? cloneobject.description : object.description,
|
|
260
|
-
'usagetype': 20,
|
|
261
|
-
'patientdescription': cloneobject.editpatientdescription ? cloneobject.patientdescription : object.patientdescription,
|
|
262
|
-
'consultantdescription': cloneobject.editconsultantdescription ? cloneobject.consultantdescription : object.consultantdescription,
|
|
263
|
-
'medicationdescription': cloneobject.editmedicationdescription ? cloneobject.medicationdescription : object.medicationdescription,
|
|
264
|
-
'patientdescriptionlocalfont': object.patientdescriptionlocalfont,
|
|
265
|
-
'timingremarks': cloneobject.editremarks ? cloneobject.remarks : object.remarks,
|
|
266
|
-
'homrcodedetail': object.homrcodedetail,
|
|
267
|
-
'hosumrprescriptiontiming': object.hosumrprescriptiontiming,
|
|
268
|
-
'displayvalue': object.description,
|
|
269
|
-
'specifictime': cloneobject.editspecifictime ? cloneobject.specifictime : object.specifictime,
|
|
270
|
-
'timeprovided': cloneobject.editspecifictime ? cloneobject.timeprovided : object.timeprovided,
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
props.onChangeDosage(obj);
|
|
274
|
-
props.onChangeData(obj);
|
|
275
|
-
props.refreshCount(1);
|
|
276
|
-
setDropDownData(obj.description);
|
|
277
|
-
console.log('OBJDAGHDGJFHADFJAFHJDAHJFDHF', JSON.stringify(obj));
|
|
278
|
-
// console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$$$", JSON.stringify(obj2))
|
|
279
|
-
setObject(obj);
|
|
280
|
-
setDropdownShow(false);
|
|
281
|
-
} else {
|
|
282
|
-
notifyMessage('Please fill out required fields', 3);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function SaveDosage(params) {
|
|
287
|
-
var groups = {
|
|
288
|
-
'procedurename': 'hosumrusage1',
|
|
289
|
-
'usagedescription': (cloneobject.description).toUpperCase(),
|
|
290
|
-
'volume': parseFloat(cloneobject.volume),
|
|
291
|
-
'unit': cloneobject.unit,
|
|
292
|
-
'intake': cloneobject.intake,
|
|
293
|
-
'usagetype': 20,
|
|
294
|
-
'hosumrusagenature': object.hosumrusagenature,
|
|
295
|
-
'patientdescription': cloneobject.patientdescription,
|
|
296
|
-
'consultantdescription': cloneobject.consultantdescription,
|
|
297
|
-
'medicationdescription': cloneobject.medicationdescription,
|
|
298
|
-
'flag': 1,
|
|
299
|
-
'remarks': cloneobject.remarks,
|
|
300
|
-
'specifictime': cloneobject.specifictime,
|
|
301
|
-
'timeprovided': cloneobject.timeprovided,
|
|
302
|
-
};
|
|
303
|
-
var output = { groups };
|
|
304
|
-
|
|
305
|
-
// console.log("OUTPUTTTTTTTTTTTTT", JSON.stringify(cloneobject.description))
|
|
306
|
-
// console.log("OUTPUTTTTTTTTTTTTT", JSON.stringify(cloneobject.volume))
|
|
307
|
-
// console.log("OUTPUTTTTTTTTTTTTT", JSON.stringify(cloneobject.unit))
|
|
308
|
-
|
|
309
|
-
if (cloneobject.description != '' && cloneobject.volume != 0 && cloneobject.unit != '' && cloneobject.volume > 0) {
|
|
310
|
-
let buttonapi = APIURL + 'commontemplatesave/RnCommonTemplateSave';
|
|
311
|
-
setIsLoading(true);
|
|
312
|
-
console.log('OUTPUTTTTTTTTTTTTT', JSON.stringify(output));
|
|
313
|
-
NetworkServiceCall('post', buttonapi, output).then(function (response) {
|
|
314
|
-
console.log('RESPONSEEEEEEEEEEEEEEEEEEEEEEEEEEEE', JSON.stringify(response));
|
|
315
|
-
if (response.httpstatus == 200
|
|
316
|
-
&& response.data != undefined && response.data != null
|
|
317
|
-
&& response.data.code != undefined && response.data.code > 0) {
|
|
318
|
-
setSection(1);
|
|
319
|
-
FetchDropdownList();
|
|
320
|
-
setObject({
|
|
321
|
-
'description': '',
|
|
322
|
-
'volume': 0,
|
|
323
|
-
'unit': '',
|
|
324
|
-
'intake': 0,
|
|
325
|
-
'usagetype': 20,
|
|
326
|
-
'hosumrusagenature': 23,
|
|
327
|
-
'hosumrusagenaturedisplay': '',
|
|
328
|
-
'patientdescription': '',
|
|
329
|
-
'consultantdescription': '',
|
|
330
|
-
'medicationdescription': '',
|
|
331
|
-
'flag': 1,
|
|
332
|
-
'remarks': '',
|
|
333
|
-
'specifictime': false,
|
|
334
|
-
'timeprovided': '',
|
|
335
|
-
});
|
|
336
|
-
notifyMessage('Data Saved!!!!!', 1);
|
|
337
|
-
setDropDownData(object.description);
|
|
338
|
-
} else {
|
|
339
|
-
notifyMessage('Data Not Saved!!!!!', 2);
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
} else {
|
|
343
|
-
notifyMessage('Please fill out required fields', 3);
|
|
344
|
-
}
|
|
345
|
-
// console.log("DAttatattatatttatatata",JSON.stringify(output))
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
function createDosage(params) {
|
|
349
|
-
return (
|
|
350
|
-
<View style={{ flex: 1 }}>
|
|
351
|
-
<View style={{ flex: 1, padding: normalize(5) }}>
|
|
352
|
-
{visibility ?
|
|
353
|
-
<ScrollView >
|
|
354
|
-
<View style={{ padding: normalize(10), backgroundColor: 'rgba(237, 232, 232,0.3)', borderWidth: 1, borderColor: 'lightgrey', borderRadius: 7 }}>
|
|
355
|
-
<View style={{}}>
|
|
356
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Dosage Title *</Text>
|
|
357
|
-
<View
|
|
358
|
-
style={{
|
|
359
|
-
flexDirection: 'row',
|
|
360
|
-
borderWidth: 1,
|
|
361
|
-
borderColor: 'lightgrey',
|
|
362
|
-
justifyContent: 'flex-start',
|
|
363
|
-
alignItems: 'center',
|
|
364
|
-
borderRadius: 7,
|
|
365
|
-
height: Dimensions.get('screen').height * 0.048,
|
|
366
|
-
backgroundColor: '#fff', elevation: 3,
|
|
367
|
-
}}>
|
|
368
|
-
|
|
369
|
-
<FontAwesome5 name={'file'} color={Global.AppTheme.primary_color}
|
|
370
|
-
size={normalize(15)} style={{ paddingHorizontal: normalize(6) }} />
|
|
371
|
-
|
|
372
|
-
<TextInput
|
|
373
|
-
editable={true} // To scroll data , Editable is checked in onChangeText props
|
|
374
|
-
keyboardType={'default'}
|
|
375
|
-
placeholder={'Headings'}
|
|
376
|
-
autoCapitalize="characters"
|
|
377
|
-
placeholderTextColor={'lightgrey'}
|
|
378
|
-
onChangeText={changevalue => (cloneobject.description = changevalue,
|
|
379
|
-
cloneobject.descriptionedit = true)}
|
|
380
|
-
scrollEnabled
|
|
381
|
-
style={{
|
|
382
|
-
textAlignVertical: 'center',
|
|
383
|
-
width: '100%',
|
|
384
|
-
marginLeft: '1%',
|
|
385
|
-
padding: 0,
|
|
386
|
-
height: '100%',
|
|
387
|
-
fontSize: normalize(14),
|
|
388
|
-
}}
|
|
389
|
-
>{object.description != undefined ? object.description : ''}</TextInput>
|
|
390
|
-
</View>
|
|
391
|
-
</View>
|
|
392
|
-
|
|
393
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
394
|
-
<View>
|
|
395
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Dosage Volume *</Text>
|
|
396
|
-
<View
|
|
397
|
-
style={{
|
|
398
|
-
flexDirection: 'row',
|
|
399
|
-
borderWidth: 1,
|
|
400
|
-
borderColor: 'lightgrey',
|
|
401
|
-
justifyContent: 'flex-start',
|
|
402
|
-
alignItems: 'center',
|
|
403
|
-
borderRadius: 7,
|
|
404
|
-
width: normalize(150),
|
|
405
|
-
height: Dimensions.get('screen').height * 0.040,
|
|
406
|
-
backgroundColor: 'white',
|
|
407
|
-
backgroundColor: '#fff', elevation: 3,
|
|
408
|
-
}}>
|
|
409
|
-
|
|
410
|
-
<FontAwesome5 name={'file'} color={Global.AppTheme.primary_color}
|
|
411
|
-
size={normalize(15)} style={{ paddingHorizontal: normalize(6) }} />
|
|
412
|
-
|
|
413
|
-
<TextInput
|
|
414
|
-
editable={true} // To scroll data , Editable is checked in onChangeText props
|
|
415
|
-
keyboardType={'number-pad'}
|
|
416
|
-
placeholder={'Volume'}
|
|
417
|
-
autoCapitalize="characters"
|
|
418
|
-
placeholderTextColor={'lightgrey'}
|
|
419
|
-
onChangeText={changevalue =>
|
|
420
|
-
(cloneobject.volume = changevalue,
|
|
421
|
-
cloneobject.editvolume = true)
|
|
422
|
-
}
|
|
423
|
-
scrollEnabled
|
|
424
|
-
style={{
|
|
425
|
-
textAlignVertical: 'center',
|
|
426
|
-
width: '100%',
|
|
427
|
-
marginLeft: '3%',
|
|
428
|
-
padding: 0,
|
|
429
|
-
height: '100%',
|
|
430
|
-
fontSize: normalize(14),
|
|
431
|
-
}}
|
|
432
|
-
>{object.volume != 0 ? object.volume : ''}</TextInput>
|
|
433
|
-
</View>
|
|
434
|
-
</View>
|
|
435
|
-
|
|
436
|
-
<View style={{ paddingHorizontal: normalize(5) }}>
|
|
437
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Unit *</Text>
|
|
438
|
-
<SDropDownNew
|
|
439
|
-
dropdownapi={'emr/emrcommonget/rnladropdown 17'}
|
|
440
|
-
dropdowndata={getDosageUnit(
|
|
441
|
-
object.unit != null && object.unit != undefined
|
|
442
|
-
? object.unit
|
|
443
|
-
: '')}
|
|
444
|
-
|
|
445
|
-
onChangeData={val =>
|
|
446
|
-
val == undefined ? null : (cloneobject.unit = val.datavalue,
|
|
447
|
-
cloneobject.editunit = true)
|
|
448
|
-
}
|
|
449
|
-
editable={true}
|
|
450
|
-
widthArr={Dimensions.get('screen').width * 0.41}
|
|
451
|
-
iconName={'file-medical'}
|
|
452
|
-
refreshCount={val =>
|
|
453
|
-
val == undefined ? null : setRefresh(refresh + val)
|
|
454
|
-
}
|
|
455
|
-
/>
|
|
456
|
-
</View>
|
|
457
|
-
|
|
458
|
-
{/* <View style={{ marginLeft: normalize(5) }}>
|
|
459
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Dosage Unit *</Text>
|
|
460
|
-
<View
|
|
461
|
-
style={{
|
|
462
|
-
flexDirection: 'row',
|
|
463
|
-
borderWidth: 1,
|
|
464
|
-
borderColor: 'black',
|
|
465
|
-
justifyContent: 'flex-start',
|
|
466
|
-
alignItems: 'center',
|
|
467
|
-
borderRadius: 7,
|
|
468
|
-
width: normalize(120),
|
|
469
|
-
height: Dimensions.get('screen').height * 0.048,
|
|
470
|
-
backgroundColor: 'white',
|
|
471
|
-
backgroundColor: '#fff',
|
|
472
|
-
}}>
|
|
473
|
-
|
|
474
|
-
<FontAwesome5 name={"file"} color=Global.AppTheme.primary_color
|
|
475
|
-
size={normalize(15)} style={{ paddingHorizontal: normalize(6) }} />
|
|
476
|
-
|
|
477
|
-
<TextInput
|
|
478
|
-
editable={true} // To scroll data , Editable is checked in onChangeText props
|
|
479
|
-
keyboardType={'default'}
|
|
480
|
-
placeholder={'Unit'}
|
|
481
|
-
autoCapitalize='characters'
|
|
482
|
-
placeholderTextColor={'lightgrey'}
|
|
483
|
-
onChangeText={changevalue =>
|
|
484
|
-
(cloneobject.unit = changevalue,
|
|
485
|
-
cloneobject.editunit = true)
|
|
486
|
-
}
|
|
487
|
-
scrollEnabled
|
|
488
|
-
style={{
|
|
489
|
-
textAlignVertical: 'center',
|
|
490
|
-
width: '100%',
|
|
491
|
-
marginLeft: '3%',
|
|
492
|
-
padding: 0,
|
|
493
|
-
height: '100%',
|
|
494
|
-
fontSize: normalize(14),
|
|
495
|
-
}}
|
|
496
|
-
>{object.unit}</TextInput>
|
|
497
|
-
</View>
|
|
498
|
-
</View> */}
|
|
499
|
-
|
|
500
|
-
</View>
|
|
501
|
-
|
|
502
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginRight: 1 }}>
|
|
503
|
-
<View style={{}}>
|
|
504
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Intake</Text>
|
|
505
|
-
<SDropDownNew
|
|
506
|
-
dropdownapi={'emr/emrcommonget/rnladropdown 1'}
|
|
507
|
-
// dropdowndata={object.intakedisplay}
|
|
508
|
-
dropdowndata={getDropDownIntake(
|
|
509
|
-
object.intake != null && object.intake != undefined
|
|
510
|
-
? object.intake
|
|
511
|
-
: '')}
|
|
512
|
-
onChangeData={val =>
|
|
513
|
-
val == undefined ? null : (cloneobject.intake = val.datavalue,
|
|
514
|
-
cloneobject.intakedisplay = val.displayvalue,
|
|
515
|
-
cloneobject.editintake = true)
|
|
516
|
-
}
|
|
517
|
-
editable={false}
|
|
518
|
-
dropdownarray={Dropdown.Intake}
|
|
519
|
-
widthArr={Dimensions.get('screen').width * 0.88}
|
|
520
|
-
iconName={'file-medical'}
|
|
521
|
-
refreshCount={val =>
|
|
522
|
-
val == undefined ? null : setRefresh(refresh + val)
|
|
523
|
-
}
|
|
524
|
-
/>
|
|
525
|
-
</View>
|
|
526
|
-
|
|
527
|
-
{/* <View style={{}}>
|
|
528
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Intake</Text>
|
|
529
|
-
<SDropDownNew
|
|
530
|
-
dropdownapi={'emr/emrcommonget/rnladropdown 1'}
|
|
531
|
-
dropdowndata={object.hosumrusagenaturedisplay}
|
|
532
|
-
onChangeData={val =>
|
|
533
|
-
val == undefined ? null : object.hosumrusagenature = val.datavalue
|
|
534
|
-
}
|
|
535
|
-
editable={false}
|
|
536
|
-
dropdownarray={Dropdown.Intake}
|
|
537
|
-
widthArr={Dimensions.get('screen').width * 0.35}
|
|
538
|
-
iconName={'file-medical'}
|
|
539
|
-
refreshCount={val =>
|
|
540
|
-
val == undefined ? null : setRefresh(refresh + val)
|
|
541
|
-
}
|
|
542
|
-
/>
|
|
543
|
-
</View> */}
|
|
544
|
-
</View>
|
|
545
|
-
|
|
546
|
-
<View style={{ flexDirection: 'column', marginHorizontal: normalize(5), justifyContent: 'space-between' }} >
|
|
547
|
-
<SCheckBox data={{
|
|
548
|
-
value: object.specifictime, size: normalize(20),
|
|
549
|
-
displaytext: 'Specific Time ?',
|
|
550
|
-
// width: Dimensions.get('screen').width * 0.5
|
|
551
|
-
}}
|
|
552
|
-
callBack={val => (val == undefined ? null : (cloneobject.specifictime = val, object.specifictime = val, cloneobject.editspecifictime = true, setRefresh(refresh + 1)))}
|
|
553
|
-
/>
|
|
554
|
-
|
|
555
|
-
{object.specifictime ?
|
|
556
|
-
<STimePicker
|
|
557
|
-
|
|
558
|
-
value={object.timeprovided}
|
|
559
|
-
callBack={val => (val == undefined ? null : (cloneobject.timeprovided = val,
|
|
560
|
-
cloneobject.editspecifictime = true))} /> : null}
|
|
561
|
-
</View>
|
|
562
|
-
|
|
563
|
-
<View style={{}}>
|
|
564
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Medication Description</Text>
|
|
565
|
-
<View
|
|
566
|
-
style={{
|
|
567
|
-
flexDirection: 'row',
|
|
568
|
-
borderWidth: 1,
|
|
569
|
-
borderColor: 'lightgrey',
|
|
570
|
-
justifyContent: 'flex-start',
|
|
571
|
-
alignItems: 'center',
|
|
572
|
-
borderRadius: 7,
|
|
573
|
-
height: Dimensions.get('screen').height * 0.049,
|
|
574
|
-
backgroundColor: '#fff', elevation: 3,
|
|
575
|
-
}}>
|
|
576
|
-
<FontAwesome5 name={'capsules'} color={Global.AppTheme.primary_color}
|
|
577
|
-
size={normalize(15)} style={{ paddingHorizontal: normalize(6) }} />
|
|
578
|
-
|
|
579
|
-
<TextInput
|
|
580
|
-
editable={true} // To scroll data , Editable is checked in onChangeText props
|
|
581
|
-
keyboardType={'default'}
|
|
582
|
-
autoCapitalize="characters"
|
|
583
|
-
placeholder={''}
|
|
584
|
-
placeholderTextColor={'lightgrey'}
|
|
585
|
-
onChangeText={changevalue =>
|
|
586
|
-
(cloneobject.medicationdescription = changevalue,
|
|
587
|
-
cloneobject.editmedicationdescription = true)
|
|
588
|
-
}
|
|
589
|
-
scrollEnabled
|
|
590
|
-
style={{
|
|
591
|
-
textAlignVertical: 'center',
|
|
592
|
-
width: '100%',
|
|
593
|
-
marginLeft: '1%',
|
|
594
|
-
padding: 0,
|
|
595
|
-
height: '100%',
|
|
596
|
-
fontSize: normalize(14),
|
|
597
|
-
}}
|
|
598
|
-
>{object.medicationdescription}</TextInput>
|
|
599
|
-
</View>
|
|
600
|
-
</View>
|
|
601
|
-
|
|
602
|
-
<View style={{}}>
|
|
603
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Consultant Description</Text>
|
|
604
|
-
<View
|
|
605
|
-
style={{
|
|
606
|
-
flexDirection: 'row',
|
|
607
|
-
borderWidth: 1,
|
|
608
|
-
borderColor: 'lightgrey',
|
|
609
|
-
justifyContent: 'flex-start',
|
|
610
|
-
alignItems: 'center',
|
|
611
|
-
borderRadius: 7,
|
|
612
|
-
height: Dimensions.get('screen').height * 0.048,
|
|
613
|
-
backgroundColor: 'white', elevation: 3,
|
|
614
|
-
}}>
|
|
615
|
-
<FontAwesome5 name={'user-md'} color={Global.AppTheme.primary_color}
|
|
616
|
-
size={normalize(15)} style={{ paddingHorizontal: normalize(6) }} />
|
|
617
|
-
|
|
618
|
-
<TextInput
|
|
619
|
-
editable={true} // To scroll data , Editable is checked in onChangeText props
|
|
620
|
-
keyboardType={'default'}
|
|
621
|
-
autoCapitalize="characters"
|
|
622
|
-
placeholder={''}
|
|
623
|
-
placeholderTextColor={'lightgrey'}
|
|
624
|
-
onChangeText={changevalue =>
|
|
625
|
-
(cloneobject.consultantdescription = changevalue,
|
|
626
|
-
cloneobject.editconsultantdescription = true)
|
|
627
|
-
}
|
|
628
|
-
scrollEnabled
|
|
629
|
-
style={{
|
|
630
|
-
textAlignVertical: 'center',
|
|
631
|
-
width: '100%',
|
|
632
|
-
marginLeft: '1%',
|
|
633
|
-
padding: 0,
|
|
634
|
-
height: '100%',
|
|
635
|
-
fontSize: normalize(14),
|
|
636
|
-
}}
|
|
637
|
-
>{object.consultantdescription}</TextInput>
|
|
638
|
-
</View>
|
|
639
|
-
</View>
|
|
640
|
-
|
|
641
|
-
<View style={{}}>
|
|
642
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Patient Description</Text>
|
|
643
|
-
<View
|
|
644
|
-
style={{
|
|
645
|
-
flexDirection: 'row',
|
|
646
|
-
borderWidth: 1,
|
|
647
|
-
borderColor: 'lightgrey',
|
|
648
|
-
justifyContent: 'flex-start',
|
|
649
|
-
alignItems: 'center',
|
|
650
|
-
borderRadius: 7,
|
|
651
|
-
height: Dimensions.get('screen').height * 0.048,
|
|
652
|
-
backgroundColor: '#fff', elevation: 3,
|
|
653
|
-
}}>
|
|
654
|
-
|
|
655
|
-
<FontAwesome5 name={'user-injured'} color={Global.AppTheme.primary_color}
|
|
656
|
-
size={normalize(15)} style={{ paddingHorizontal: normalize(6) }} />
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
<TextInput
|
|
660
|
-
editable={true} // To scroll data , Editable is checked in onChangeText props
|
|
661
|
-
keyboardType={'default'}
|
|
662
|
-
placeholder={''}
|
|
663
|
-
autoCapitalize="characters"
|
|
664
|
-
placeholderTextColor={'lightgrey'}
|
|
665
|
-
onChangeText={changevalue =>
|
|
666
|
-
(cloneobject.patientdescription = changevalue,
|
|
667
|
-
cloneobject.editpatientdescription = true)
|
|
668
|
-
}
|
|
669
|
-
scrollEnabled
|
|
670
|
-
style={{
|
|
671
|
-
textAlignVertical: 'center',
|
|
672
|
-
width: '100%',
|
|
673
|
-
marginLeft: '1%',
|
|
674
|
-
padding: 0,
|
|
675
|
-
height: '100%',
|
|
676
|
-
fontSize: normalize(14),
|
|
677
|
-
}}
|
|
678
|
-
>{object.patientdescription}</TextInput>
|
|
679
|
-
</View>
|
|
680
|
-
</View>
|
|
681
|
-
|
|
682
|
-
<View style={{}}>
|
|
683
|
-
<Text style={{ fontSize: normalize(11), paddingHorizontal: 10 }}>Remarks</Text>
|
|
684
|
-
<View
|
|
685
|
-
style={{
|
|
686
|
-
flexDirection: 'row',
|
|
687
|
-
borderWidth: 1,
|
|
688
|
-
borderColor: 'lightgrey',
|
|
689
|
-
justifyContent: 'flex-start',
|
|
690
|
-
alignItems: 'center',
|
|
691
|
-
borderRadius: 7,
|
|
692
|
-
height: Dimensions.get('screen').height * 0.048,
|
|
693
|
-
backgroundColor: '#fff', elevation: 3,
|
|
694
|
-
}}>
|
|
695
|
-
<FontAwesome5 name={'file'} color={Global.AppTheme.primary_color}
|
|
696
|
-
size={normalize(15)} style={{ paddingHorizontal: normalize(6) }} />
|
|
697
|
-
|
|
698
|
-
<TextInput
|
|
699
|
-
editable={true} // To scroll data , Editable is checked in onChangeText props
|
|
700
|
-
keyboardType={'default'}
|
|
701
|
-
autoCapitalize="characters"
|
|
702
|
-
placeholder={'Remarks'}
|
|
703
|
-
placeholderTextColor={'lightgrey'}
|
|
704
|
-
onChangeText={changevalue =>
|
|
705
|
-
(cloneobject.remarks = changevalue,
|
|
706
|
-
cloneobject.editremarks = true)
|
|
707
|
-
}
|
|
708
|
-
scrollEnabled
|
|
709
|
-
style={{
|
|
710
|
-
textAlignVertical: 'center',
|
|
711
|
-
width: '100%',
|
|
712
|
-
marginLeft: '1%',
|
|
713
|
-
padding: 0,
|
|
714
|
-
height: '100%',
|
|
715
|
-
fontSize: normalize(14),
|
|
716
|
-
}}
|
|
717
|
-
>{object.remarks}</TextInput>
|
|
718
|
-
</View>
|
|
719
|
-
</View>
|
|
720
|
-
</View>
|
|
721
|
-
</ScrollView> : null}
|
|
722
|
-
</View >
|
|
723
|
-
|
|
724
|
-
<View style={{ flexDirection: 'row' }}>
|
|
725
|
-
<View
|
|
726
|
-
style={{
|
|
727
|
-
position: 'absolute',
|
|
728
|
-
bottom: normalize(0),
|
|
729
|
-
zIndex: 1,
|
|
730
|
-
width: '100%',
|
|
731
|
-
// justifyContent: 'center',
|
|
732
|
-
alignItems: 'center',
|
|
733
|
-
flexDirection: 'row',
|
|
734
|
-
backgroundColor: 'white',
|
|
735
|
-
height: normalize(32),
|
|
736
|
-
}}>
|
|
737
|
-
{savevisibility ?
|
|
738
|
-
<TouchableOpacity
|
|
739
|
-
onPress={() => SaveDosage()}
|
|
740
|
-
style={{
|
|
741
|
-
width: '20%',
|
|
742
|
-
height: normalize(30),
|
|
743
|
-
borderRadius: 7,
|
|
744
|
-
//backgroundColor: '#eae3e3',
|
|
745
|
-
alignItems: 'flex-start',
|
|
746
|
-
justifyContent: 'center',
|
|
747
|
-
}}>
|
|
748
|
-
<View style={{ backgroundColor: '#f4f2f2', alignItems: 'center', padding: normalize(6), paddingHorizontal: normalize(15), borderRadius: 7, borderBottomWidth: 4, borderBottomColor: 'lightgrey' }}>
|
|
749
|
-
<Entypo name="save" color={Global.AppTheme.primary_color} size={normalize(25)} />
|
|
750
|
-
<Text style={{ fontSize: normalize(10), color: Global.AppTheme.primary_color, marginLeft: normalize(5) }}>
|
|
751
|
-
Save
|
|
752
|
-
</Text>
|
|
753
|
-
</View>
|
|
754
|
-
</TouchableOpacity> : null}
|
|
755
|
-
|
|
756
|
-
{!savevisibility ?
|
|
757
|
-
<TouchableOpacity
|
|
758
|
-
onPress={() => AddNewDosage()}
|
|
759
|
-
style={{
|
|
760
|
-
width: '20%',
|
|
761
|
-
height: normalize(30),
|
|
762
|
-
borderRadius: 7,
|
|
763
|
-
//backgroundColor: '#eae3e3',
|
|
764
|
-
alignItems: 'center',
|
|
765
|
-
justifyContent: 'center',
|
|
766
|
-
}}>
|
|
767
|
-
<View style={{ backgroundColor: '#f4f2f2', alignItems: 'center', padding: normalize(6), paddingHorizontal: normalize(15), borderRadius: 7, borderBottomWidth: 4, borderBottomColor: 'lightgrey' }}>
|
|
768
|
-
<FontAwesome5 name="edit" color={Global.AppTheme.primary_color} size={normalize(20)} />
|
|
769
|
-
<Text style={{ fontSize: normalize(10), color: Global.AppTheme.primary_color, fontWeight: 'bold' }}>
|
|
770
|
-
EDIT
|
|
771
|
-
</Text>
|
|
772
|
-
</View>
|
|
773
|
-
</TouchableOpacity> : null}
|
|
774
|
-
</View>
|
|
775
|
-
</View>
|
|
776
|
-
</View>
|
|
777
|
-
);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
function getOverlayChildrenWrapperStyle() {
|
|
781
|
-
return ({
|
|
782
|
-
position: 'absolute',
|
|
783
|
-
bottom: 0,
|
|
784
|
-
top: Dimensions.get('screen').height * 0.17,
|
|
785
|
-
width: Dimensions.get('screen').width,
|
|
786
|
-
borderRadius: 20,
|
|
787
|
-
borderWidth: 2,
|
|
788
|
-
borderColor: '#e0e0e0',
|
|
789
|
-
paddingHorizontal: normalize(5),
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
function getSectionNew(params) {
|
|
794
|
-
setSection(2, FetchDropdownList());
|
|
795
|
-
setObject({
|
|
796
|
-
'description': '',
|
|
797
|
-
'volume': 0,
|
|
798
|
-
'unit': '',
|
|
799
|
-
'intake': 0,
|
|
800
|
-
'usagetype': 20,
|
|
801
|
-
'hosumrusagenature': 23,
|
|
802
|
-
'hosumrusagenaturedisplay': '',
|
|
803
|
-
'patientdescription': '',
|
|
804
|
-
'consultantdescription': '',
|
|
805
|
-
'medicationdescription': '',
|
|
806
|
-
'flag': 1,
|
|
807
|
-
'remarks': '',
|
|
808
|
-
'specifictime': false,
|
|
809
|
-
'timeprovided': '',
|
|
810
|
-
'editspecifictime': false,
|
|
811
|
-
});
|
|
812
|
-
setSaveVisibility(true);
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
return (
|
|
817
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
818
|
-
<TouchableOpacity
|
|
819
|
-
onPress={() => props.editable ? FetchDropdownList() : EditDosage()}
|
|
820
|
-
disabled={props.disabled != undefined ? props.disabled : false}
|
|
821
|
-
onLongPress={() => props.LongPress ? setStage(true) : null}
|
|
822
|
-
style={{
|
|
823
|
-
// borderTopWidth: 1, borderBottomWidth: 1, borderLeftWidth: 0.5, borderRightWidth: 0.5,
|
|
824
|
-
paddingLeft: 1, width: props.widthArr, alignItems: 'center',
|
|
825
|
-
backgroundColor: '#fff', borderWidth: 0,
|
|
826
|
-
elevation: 3, shadowColor: '#000',
|
|
827
|
-
shadowOffset: { width: 0, height: 2 },
|
|
828
|
-
shadowRadius: 2,
|
|
829
|
-
height: props.heightArr ? props.heightArr : Dimensions.get('screen').height * 0.06,
|
|
830
|
-
flexDirection: 'row', borderRadius: 10,
|
|
831
|
-
// borderColor: props.borderArr ? props.borderArr : Global.AppTheme.primary_color
|
|
832
|
-
}}
|
|
833
|
-
>
|
|
834
|
-
{props.iconName ?
|
|
835
|
-
<View style={{ width: normalize(15) }}>
|
|
836
|
-
<Ionicons name={props.iconName} color=
|
|
837
|
-
{props.flagData == 1 ? Global.AppTheme.primary_color : Global.AppTheme.primary_color}
|
|
838
|
-
size={normalize(14)} />
|
|
839
|
-
</View> : null}
|
|
840
|
-
|
|
841
|
-
<View>
|
|
842
|
-
<Text adjustsFontSizeToFit numberOfLines={2} style={{ fontSize: normalize(11), alignSelf: 'flex-start', fontWeight: 'bold', width: normalize(100) }} >
|
|
843
|
-
{dropdowndata != null && dropdowndata != undefined ? dropdowndata : ''}
|
|
844
|
-
{/* {getDropDownData(dropdowndata)} */}
|
|
845
|
-
</Text>
|
|
846
|
-
</View>
|
|
847
|
-
|
|
848
|
-
<FontAwesome name="window-close" color={Global.AppTheme.primary_color} size={normalize(15)}
|
|
849
|
-
onPress={() => setDropDownData('', props.onDeleteData(props.completeData))} style={{ position: 'absolute', right: 2, bottom: 2 }} />
|
|
850
|
-
{isdropdownshow ?
|
|
851
|
-
<Overlay visible={true}
|
|
852
|
-
onClose={() => setDropdownShow(false)}
|
|
853
|
-
closeOnTouchOutside
|
|
854
|
-
animationType="fadeInUp"
|
|
855
|
-
containerStyle={{ backgroundColor: 'transparent' }}
|
|
856
|
-
childrenWrapperStyle={getOverlayChildrenWrapperStyle()}
|
|
857
|
-
animationDuration={1500}
|
|
858
|
-
>
|
|
859
|
-
<Text style={{ alignSelf: 'center', fontSize: normalize(12), fontWeight: 'bold', marginBottom: normalize(8), color: Global.AppTheme.primary_color, marginTop: normalize(-3) }}>{section == 1 ? 'SELECT DOSAGE' : savevisibility ? 'CREATE DOSAGE' : 'EDIT DOSAGE'}</Text>
|
|
860
|
-
<View style={{ flex: 1, width: '100%' }}>
|
|
861
|
-
<View
|
|
862
|
-
style={{
|
|
863
|
-
//marginTop: normalize(10),
|
|
864
|
-
// backgroundColor: '#eae5e5',
|
|
865
|
-
width: '100%',
|
|
866
|
-
borderRadius: 5,
|
|
867
|
-
height: normalize(35),
|
|
868
|
-
flexDirection: 'row',
|
|
869
|
-
alignItems: 'center',
|
|
870
|
-
justifyContent: 'space-evenly',
|
|
871
|
-
|
|
872
|
-
}}>
|
|
873
|
-
<TouchableOpacity
|
|
874
|
-
onPress={() => setSection(1)}
|
|
875
|
-
style={{
|
|
876
|
-
height: '100%',
|
|
877
|
-
flexDirection: 'column', padding: 5,
|
|
878
|
-
alignItems: 'center',
|
|
879
|
-
backgroundColor: section == 1 ? '#eaf2ff' : '#fff',
|
|
880
|
-
borderWidth: 1, borderRadius: 5,
|
|
881
|
-
borderColor: Global.AppTheme.primary_color,
|
|
882
|
-
width: '15%', justifyContent: 'center', elevation: 3,
|
|
883
|
-
}}>
|
|
884
|
-
<View style={{}}>
|
|
885
|
-
<MaterialIcons
|
|
886
|
-
name="find-in-page"
|
|
887
|
-
color={Global.AppTheme.primary_color}
|
|
888
|
-
size={normalize(20)}
|
|
889
|
-
/>
|
|
890
|
-
</View>
|
|
891
|
-
<View>
|
|
892
|
-
<Text
|
|
893
|
-
style={[getPopupHeadingOptionText(
|
|
894
|
-
section == 1 ? Global.AppTheme.primary_color : Global.AppTheme.primary_color,
|
|
895
|
-
),{fontSize:normalize(10)}]}>
|
|
896
|
-
ALL
|
|
897
|
-
</Text>
|
|
898
|
-
</View>
|
|
899
|
-
</TouchableOpacity>
|
|
900
|
-
|
|
901
|
-
<TouchableOpacity
|
|
902
|
-
onPress={() => getSectionNew()}
|
|
903
|
-
style={{
|
|
904
|
-
height: '100%',
|
|
905
|
-
flexDirection: 'column',
|
|
906
|
-
alignItems: 'center',
|
|
907
|
-
padding: normalize(5),
|
|
908
|
-
backgroundColor: section == 1 ? '#fff' : '#eaf2ff',
|
|
909
|
-
borderWidth: 1, borderRadius: 5,
|
|
910
|
-
borderColor: Global.AppTheme.primary_color,
|
|
911
|
-
width: '15%', justifyContent: 'center', elevation: 3,
|
|
912
|
-
}}>
|
|
913
|
-
<View>
|
|
914
|
-
<Entypo
|
|
915
|
-
name="add-to-list"
|
|
916
|
-
color={Global.AppTheme.primary_color}
|
|
917
|
-
size={normalize(20)}
|
|
918
|
-
/>
|
|
919
|
-
</View>
|
|
920
|
-
<View>
|
|
921
|
-
<Text
|
|
922
|
-
style={[getPopupHeadingOptionText(
|
|
923
|
-
section == 2 ? '#eaf2ff' : '#fff',
|
|
924
|
-
),{fontSize:normalize(10)}]}>
|
|
925
|
-
CREATE
|
|
926
|
-
</Text>
|
|
927
|
-
</View>
|
|
928
|
-
</TouchableOpacity>
|
|
929
|
-
|
|
930
|
-
<TouchableOpacity style={{
|
|
931
|
-
height: '100%',
|
|
932
|
-
flexDirection: 'column', padding: 5,
|
|
933
|
-
alignItems: 'center',
|
|
934
|
-
backgroundColor: '#fff',
|
|
935
|
-
borderWidth: 1, borderRadius: 5,
|
|
936
|
-
borderColor: Global.AppTheme.primary_color,
|
|
937
|
-
width: '15%', justifyContent: 'center', elevation: 3,
|
|
938
|
-
}}
|
|
939
|
-
onPress={() => setDropdownShow(false)}
|
|
940
|
-
>
|
|
941
|
-
<FontAwesome name={'reply'}
|
|
942
|
-
color={Global.AppTheme.primary_color} size={normalize(20)} />
|
|
943
|
-
<Text
|
|
944
|
-
style={[getPopupHeadingOptionText(
|
|
945
|
-
|
|
946
|
-
), { fontSize: normalize(10) }]}>
|
|
947
|
-
BACK
|
|
948
|
-
</Text>
|
|
949
|
-
</TouchableOpacity>
|
|
950
|
-
|
|
951
|
-
</View>
|
|
952
|
-
{section == 1 ?
|
|
953
|
-
<View style={{ flex: 1, width: '100%' }}>
|
|
954
|
-
{!isLoading ?
|
|
955
|
-
searchResult.httpstatus == 200 ?
|
|
956
|
-
DropdownLayout()
|
|
957
|
-
:
|
|
958
|
-
<View>
|
|
959
|
-
<Text style={[ComponentStyles.no_data_found_text]}>No Result Found</Text>
|
|
960
|
-
</View>
|
|
961
|
-
:
|
|
962
|
-
<View style={{
|
|
963
|
-
flex: 1, width: '100%', justifyContent: 'center',
|
|
964
|
-
backgroundColor: 'transparent', borderRadius: 10,
|
|
965
|
-
}}>
|
|
966
|
-
<SearchLoader />
|
|
967
|
-
</View>}
|
|
968
|
-
</View> :
|
|
969
|
-
<View style={{ flex: 1, width: '100%' }}>
|
|
970
|
-
{createDosage()}
|
|
971
|
-
</View>}
|
|
972
|
-
</View>
|
|
973
|
-
</Overlay>
|
|
974
|
-
: null}
|
|
975
|
-
</TouchableOpacity>
|
|
976
|
-
</View>
|
|
977
|
-
|
|
978
|
-
);
|
|
979
|
-
|
|
980
|
-
function GetDropdown(data) {
|
|
981
|
-
const newDropDownData = data.filter(function (item) {
|
|
982
|
-
const dataItem = item.displayvalue ? item.displayvalue.toUpperCase() : ''.toUpperCase();
|
|
983
|
-
const textData = searchData.toUpperCase();
|
|
984
|
-
return dataItem.indexOf(textData) > -1;
|
|
985
|
-
});
|
|
986
|
-
return (
|
|
987
|
-
<View style={{ flexDirection: 'row' }}>
|
|
988
|
-
<FlatList
|
|
989
|
-
data={newDropDownData}
|
|
990
|
-
renderItem={renderItem}
|
|
991
|
-
initialNumToRender={10}
|
|
992
|
-
keyExtractor={(item, index) => 'key' + index}
|
|
993
|
-
/>
|
|
994
|
-
|
|
995
|
-
<View style={{
|
|
996
|
-
height: Dimensions.get('window').height * 0.60,
|
|
997
|
-
marginBottom: Dimensions.get('window').height * 0.01,
|
|
998
|
-
}}>
|
|
999
|
-
<FlatList
|
|
1000
|
-
data={['#', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '.', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']}
|
|
1001
|
-
renderItem={renderAlphabet}
|
|
1002
|
-
style={{ paddingBottom: 20 }}
|
|
1003
|
-
contentContainerStyle={{ alignItems: 'center' }}
|
|
1004
|
-
keyExtractor={(item, index) => 'key' + index}
|
|
1005
|
-
/>
|
|
1006
|
-
</View>
|
|
1007
|
-
</View>
|
|
1008
|
-
);
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
function getAlphabetData(alpha, index) {
|
|
1012
|
-
var filter = displayData.filter(value => value.displayvalue != undefined ? (value.displayvalue).charAt(0) == alpha : '');
|
|
1013
|
-
setAlphaIndex(index);
|
|
1014
|
-
setFilterPurpose(filter);
|
|
1015
|
-
setSearchData(alpha);
|
|
1016
|
-
index == 0 ? (setAlphaFilter(false), setSearchData('')) : (setAlphaFilter(true), setSearchData(alpha));
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
function renderAlphabet({ index, item }) {
|
|
1020
|
-
return (
|
|
1021
|
-
<TouchableOpacity style={{
|
|
1022
|
-
width: normalize(25), alignItems: 'center', paddingVertical: 2, borderRadius: normalize(40) / 2,
|
|
1023
|
-
backgroundColor: index == alphaindex ? '#8162fc' : 'white',
|
|
1024
|
-
}}
|
|
1025
|
-
onPress={() => getAlphabetData(item, index)}>
|
|
1026
|
-
<Text style={{
|
|
1027
|
-
color: index == alphaindex ? 'white' : 'black',
|
|
1028
|
-
fontWeight: index == alphaindex ? 'bold' : 'normal',
|
|
1029
|
-
}}>{item}</Text>
|
|
1030
|
-
</TouchableOpacity>
|
|
1031
|
-
);
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
function renderItem(data) {
|
|
1035
|
-
return (
|
|
1036
|
-
<TouchableOpacity
|
|
1037
|
-
style={[getListviewItem(), { flexDirection: 'row', alignItems: 'center' }]}
|
|
1038
|
-
onPress={() => selection(data.item, data.item.selected, props.keycode)}
|
|
1039
|
-
activeOpacity={0.5}
|
|
1040
|
-
>
|
|
1041
|
-
<Icons.FontAwesome name="dot-circle-o" color={Global.AppTheme.primary_color} size={normalize(12)}
|
|
1042
|
-
style={{ paddingHorizontal: normalize(2), paddingLeft: normalize(5) }} />
|
|
1043
|
-
|
|
1044
|
-
<Text style={selectedValue != null && selectedValue != undefined ? selectedValue == item.datavalue ? getListviewItemText(true) : getListviewItemText(false) : getListviewItemText(false)}>
|
|
1045
|
-
{data.item.displayvalue}
|
|
1046
|
-
</Text>
|
|
1047
|
-
</TouchableOpacity>
|
|
1048
|
-
);
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
function getOverlayScreenChildcontainer() {
|
|
1052
|
-
return (
|
|
1053
|
-
{
|
|
1054
|
-
height: Dimensions.get('window').height * 0.60,
|
|
1055
|
-
marginBottom: Dimensions.get('window').height * 0.01,
|
|
1056
|
-
marginTop: Dimensions.get('window').height * 0.01,
|
|
1057
|
-
}
|
|
1058
|
-
);
|
|
1059
|
-
}
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
const layoutstyles = StyleSheet.create({
|
|
1063
|
-
lefticon_container: {
|
|
1064
|
-
marginLeft: '2%',
|
|
1065
|
-
},
|
|
1066
|
-
textinput_view: {
|
|
1067
|
-
flex: 1,
|
|
1068
|
-
paddingLeft: '1%',
|
|
1069
|
-
},
|
|
1070
|
-
overlay_screen_listview_container: {
|
|
1071
|
-
justifyContent: 'center',
|
|
1072
|
-
marginBottom: 10,
|
|
1073
|
-
},
|
|
1074
|
-
overlay_searchTextbox_View: {
|
|
1075
|
-
width: '96%',
|
|
1076
|
-
|
|
1077
|
-
},
|
|
1078
|
-
overlay_screen_heading_text: {
|
|
1079
|
-
...ComponentStyles.popup_heading,
|
|
1080
|
-
width: '100%',
|
|
1081
|
-
},
|
|
1082
|
-
overlay_screen_container: {
|
|
1083
|
-
width: '100%',
|
|
1084
|
-
},
|
|
1085
|
-
});
|
|
1086
|
-
|
|
1087
|
-
export default SDropDownDosage;
|