diff --git a/resources/js/constants.js b/resources/js/constants.js
index 2cf6332..08ef2c2 100644
--- a/resources/js/constants.js
+++ b/resources/js/constants.js
@@ -3,6 +3,7 @@ let MAIN_DOMAIN = "http://127.0.0.1:8000";
//let MAIN_DOMAIN = "http://telemedpro.test";
export const ADMIN_LOGIN_API = MAIN_DOMAIN + "/api/admin/login"
+export const PATIENT_FILTER_LIST_API = MAIN_DOMAIN + "/api/admin/patient-list/"
export const PATIENT_LIST_API = MAIN_DOMAIN + "/api/admin/patient-list"
export const PATIENT_INFO_API = MAIN_DOMAIN + "/api/admin/patient/"
export const PATIENT_MEETING_LIST_API = MAIN_DOMAIN + "/api/admin/get-meeting-history/"
@@ -12,6 +13,9 @@ export const PATIENT_DELETE_API = MAIN_DOMAIN + "/api/admin/patient-delete/"
export const PATIENT_LABKIT_LIST_API = MAIN_DOMAIN + "/api/admin/patient-labkit-list/"
export const PATIENT_LABKIT_STATUS_UPDATE_API = MAIN_DOMAIN + "/api/admin/labkit-status-update/"
+export const PATIENT_PRESCRIPTION_STATUS_UPDATE_API = MAIN_DOMAIN + "/api/admin/patient-prescription-status-update/"
+
+export const SUBCRIPTIONS_LIST_API = MAIN_DOMAIN + "/api/plans/"
export const PROVIDER_LIST_API = MAIN_DOMAIN + "/api/admin/telemed-pro-list"
diff --git a/resources/js/pages/pages/patient-labkits/labkit.vue b/resources/js/pages/pages/patient-labkits/labkit.vue
index 145dea5..bc97069 100644
--- a/resources/js/pages/pages/patient-labkits/labkit.vue
+++ b/resources/js/pages/pages/patient-labkits/labkit.vue
@@ -88,10 +88,10 @@ const breadcrums = [
-
{{labkitStatus }}
@@ -192,3 +192,8 @@ const breadcrums = [
+
diff --git a/resources/js/pages/pages/patient-meetings/prescription.vue b/resources/js/pages/pages/patient-meetings/prescription.vue
index d0785ea..36a860c 100644
--- a/resources/js/pages/pages/patient-meetings/prescription.vue
+++ b/resources/js/pages/pages/patient-meetings/prescription.vue
@@ -8,7 +8,7 @@ const itemsPrescriptions = ref([]);
const patientId = route.params.patient_id;
const appointmentId = route.params.id;
const prescription = computed(async () => {
- console.log('computed=====')
+ // console.log('computed=====')
await getprescriptionList()
// await store.dispatch('getHistoryPrescription')
// notes.value = store.getters.getHistoryPrescription;
@@ -22,7 +22,7 @@ const getprescriptionList = async () => {
appointment_id: appointmentId,
})
let prescriptions = store.getters.getPrescriptionList
- console.log("BeforeOverviewItem", prescriptions);
+ // console.log("BeforeOverviewItem", prescriptions);
// itemsPrescriptions.value = store.getters.getPrescriptionList
for (let data of prescriptions) {
let dataObject = {}
@@ -35,6 +35,7 @@ const getprescriptionList = async () => {
dataObject.from = data.from
dataObject.name = data.name
dataObject.quantity = data.quantity
+ dataObject.id = data.id
dataObject.doctor = data.doctor.name
dataObject.refill_quantity = data.refill_quantity
dataObject.status = data.status
@@ -122,6 +123,9 @@ const headers = [
const prescriptionIndex = ref([]);
const prescriptionItem = ref(-1)
const prescriptionDialog = ref(false)
+const getSelectedCart = ref('');
+const getIsTonalSnackbarVisible = ref(false);
+const prescriptionStatus = ref('');
const selectedItem = ref(null);
const showDetail = item => {
// console.log("id",item);
@@ -148,6 +152,23 @@ const breadcrums = [
}
];
+
+const onChange = (id)=> {
+ getSelectedCart.value = id;
+
+}
+const onStatusChange = async(status) => {
+ console.log('Selected status:', status, getSelectedCart.value);
+ store.dispatch('updateIsLoading', true)
+ await store.dispatch('updatePrescriptionStatus', {
+ prescription_id : getSelectedCart.value,
+ status: status
+ })
+ console.log('Selected:', store.getters.getPatientPrescriptionStatus);
+ prescriptionStatus.value = store.getters.getPatientPrescriptionStatus.status;
+ getIsTonalSnackbarVisible.value = true;
+};
+
@@ -155,6 +176,12 @@ const breadcrums = [
>
+
+ {{prescriptionStatus }}
+
@@ -191,13 +218,24 @@ const breadcrums = [
+
+
+
+
diff --git a/resources/js/pages/patients/meetings.vue b/resources/js/pages/patients/meetings.vue
index bbac155..3a19fbc 100644
--- a/resources/js/pages/patients/meetings.vue
+++ b/resources/js/pages/patients/meetings.vue
@@ -49,7 +49,7 @@ function changeDateFormat(dateFormat) {
if (dateFormat) {
const [datePart, timePart] = dateFormat.split(' ');
const [year, month, day] = datePart.split('-');
- const formattedDate = `${parseInt(month)}-${parseInt(day)}-${year}`;
+ // const formattedDate = `${parseInt(month)}-${parseInt(day)}-${year}`;
return `${formattedDate} ${timePart}`;
}
return dateFormat;
diff --git a/resources/js/pages/patients/patients.vue b/resources/js/pages/patients/patients.vue
index 9229ce1..97cc792 100644
--- a/resources/js/pages/patients/patients.vue
+++ b/resources/js/pages/patients/patients.vue
@@ -21,7 +21,17 @@ const defaultItem = ref({
const editedItem = ref(defaultItem.value)
const editedIndex = ref(-1)
const patientList = ref([])
+const subcriptionLists = ref([])
const isLoading=ref(false)
+
+const filter = ref({
+ gender: '',
+ state: '',
+ plan: '',
+})
+// const gender =ref();
+// const city =ref();
+// const plan =ref();
// status options
const selectedOptions = [
{
@@ -40,13 +50,28 @@ const refVForm = ref(null)
onBeforeMount(async () => {});
onMounted(async () => {
store.dispatch('updateIsLoading', true)
+ await store.dispatch('getSubcriptions')
await store.dispatch('patientList')
// console.log('patientList',store.getters.getPatientList)
// patientList.value = store.getters.getPatientList
store.dispatch('updateIsLoading', false)
});
+
+const getPatientFilter = async() => {
+ console.log("filter", filter.value.plan, filter.value.gender, filter.value.state);
+
+ await store.dispatch('PatientFilter', {
+ plan: filter.value.plan,
+ gender: filter.value.gender,
+ state: filter.value.state,
+ })
+ store.dispatch('updateIsLoading', false)
+}
+
const getPatientList = computed(async () => {
+ subcriptionLists.value = store.getters.getSubcriptions;
+ console.log("subcriptin",subcriptionLists.value);
patientList.value = store.getters.getPatientList.map(history => ({
...history,
dob: changeFormat(history.dob),
@@ -189,6 +214,83 @@ const save = async () => {
}
+const states = ref([
+ { name: 'Alabama', abbreviation: 'AL' },
+ { name: 'Alaska', abbreviation: 'AK' },
+ { name: 'Arizona', abbreviation: 'AZ' },
+ { name: 'Arkansas', abbreviation: 'AR' },
+ { name: 'Howland Island', abbreviation: 'UM-84' },
+ { name: 'Delaware', abbreviation: 'DE' },
+ { name: 'Maryland', abbreviation: 'MD' },
+ { name: 'Baker Island', abbreviation: 'UM-81' },
+ { name: 'Kingman Reef', abbreviation: 'UM-89' },
+ { name: 'New Hampshire', abbreviation: 'NH' },
+ { name: 'Wake Island', abbreviation: 'UM-79' },
+ { name: 'Kansas', abbreviation: 'KS' },
+ { name: 'Texas', abbreviation: 'TX' },
+ { name: 'Nebraska', abbreviation: 'NE' },
+ { name: 'Vermont', abbreviation: 'VT' },
+ { name: 'Jarvis Island', abbreviation: 'UM-86' },
+ { name: 'Hawaii', abbreviation: 'HI' },
+ { name: 'Guam', abbreviation: 'GU' },
+ { name: 'United States Virgin Islands', abbreviation: 'VI' },
+ { name: 'Utah', abbreviation: 'UT' },
+ { name: 'Oregon', abbreviation: 'OR' },
+ { name: 'California', abbreviation: 'CA' },
+ { name: 'New Jersey', abbreviation: 'NJ' },
+ { name: 'North Dakota', abbreviation: 'ND' },
+ { name: 'Kentucky', abbreviation: 'KY' },
+ { name: 'Minnesota', abbreviation: 'MN' },
+ { name: 'Oklahoma', abbreviation: 'OK' },
+ { name: 'Pennsylvania', abbreviation: 'PA' },
+ { name: 'New Mexico', abbreviation: 'NM' },
+ { name: 'American Samoa', abbreviation: 'AS' },
+ { name: 'Illinois', abbreviation: 'IL' },
+ { name: 'Michigan', abbreviation: 'MI' },
+ { name: 'Virginia', abbreviation: 'VA' },
+ { name: 'Johnston Atoll', abbreviation: 'UM-67' },
+ { name: 'West Virginia', abbreviation: 'WV' },
+ { name: 'Mississippi', abbreviation: 'MS' },
+ { name: 'Northern Mariana Islands', abbreviation: 'MP' },
+ { name: 'United States Minor Outlying Islands', abbreviation: 'UM' },
+ { name: 'Massachusetts', abbreviation: 'MA' },
+ { name: 'Connecticut', abbreviation: 'CT' },
+ { name: 'Florida', abbreviation: 'FL' },
+ { name: 'District of Columbia', abbreviation: 'DC' },
+ { name: 'Midway Atoll', abbreviation: 'UM-71' },
+ { name: 'Navassa Island', abbreviation: 'UM-76' },
+ { name: 'Indiana', abbreviation: 'IN' },
+ { name: 'Wisconsin', abbreviation: 'WI' },
+ { name: 'Wyoming', abbreviation: 'WY' },
+ { name: 'South Carolina', abbreviation: 'SC' },
+ { name: 'Arkansas', abbreviation: 'AR' },
+ { name: 'South Dakota', abbreviation: 'SD' },
+ { name: 'Montana', abbreviation: 'MT' },
+ { name: 'North Carolina', abbreviation: 'NC' },
+ { name: 'Palmyra Atoll', abbreviation: 'UM-95' },
+ { name: 'Puerto Rico', abbreviation: 'PR' },
+ { name: 'Colorado', abbreviation: 'CO' },
+ { name: 'Missouri', abbreviation: 'MO' },
+ { name: 'New York', abbreviation: 'NY' },
+ { name: 'Maine', abbreviation: 'ME' },
+ { name: 'Tennessee', abbreviation: 'TN' },
+ { name: 'Georgia', abbreviation: 'GA' },
+ { name: 'Louisiana', abbreviation: 'LA' },
+ { name: 'Nevada', abbreviation: 'NV' },
+ { name: 'Iowa', abbreviation: 'IA' },
+ { name: 'Idaho', abbreviation: 'ID' },
+ { name: 'Rhode Island', abbreviation: 'RI' },
+ { name: 'Washington', abbreviation: 'WA' },
+ { name: 'Ohio', abbreviation: 'OH' },
+ // ... (add the rest of the states)
+]);
+
+const sortedStates = computed(() => {
+ return states.value.slice().sort((a, b) => {
+ return a.name.localeCompare(b.name);
+ });
+});
+
const deleteItemConfirm = async () => {
console.log('editedIndex.value',editedIndex.value,editedItem.value.id)
await store.dispatch('patientDelete',{
@@ -210,13 +312,33 @@ function changeFormat(dateFormat) {
// Format the date as mm-dd-yyyy
const formattedDate = month + '-' + day + '-' + date.getFullYear();
- console.log("formattedDate",formattedDate)
+ // console.log("formattedDate",formattedDate)
return formattedDate;
}
const LabKit = (item)=> {
router.push('/admin/patients/labkit/'+item.id);
}
+const onSubcriptionChange = async(newvalue)=> {
+ filter.value.plan = newvalue;
+ console.log("Plan",filter.value.plan );
+ await getPatientFilter();
+
+}
+const onGenderChange = async(newvalue)=> {
+ filter.value.gender = newvalue;
+ console.log("gender",filter.value.gender);
+ await getPatientFilter();
+
+}
+const onStateChange = async(newvalue)=> {
+ filter.value.state = newvalue;
+ console.log("state",filter.value.state);
+ await getPatientFilter();
+
+}
+
+
@@ -225,9 +347,61 @@ const LabKit = (item)=> {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ commit('setLoading', false)
+ console.log('Response Patient:', response.data.patients);
+ let dataArray =[]
+ for (let data of response.data.patients) {
+ let dataObject = {}
+ dataObject.name = data.first_name + ' ' + data.last_name
+ dataObject.first_name = data.first_name
+ dataObject.last_name = data.last_name
+ dataObject.email = data.email
+ dataObject.dob = data.dob
+ dataObject.phone_no = data.phone_no
+ dataObject.avatar = '',
+ dataObject.id = data.id,
+ dataArray.push(dataObject)
+ }
+ console.log(dataArray)
+ commit('setPtientList',dataArray)
+
+ })
+ .catch(error => {
+ commit('setLoading', false)
+ console.error('Error:', error);
+ });
+ },
+ async getSubcriptions ({commit,state},payload){
+ commit('setLoading', true)
+ await axios.post(SUBCRIPTIONS_LIST_API, {}, {
+ headers: {
+ 'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
+ }
+ }) .then(response => {
+ commit('setLoading', false)
+ console.log('Response Subcriptions:', response.data);
+ commit('setSubcriptions',response.data);
+ })
+ .catch(error => {
+ commit('setLoading', false)
+ commit('setPrescription',null)
+ console.error('Error:', error);
+ });
+ },
async patientMeetingList({ commit }, payload) {
commit('setLoading', true)
console.log(localStorage.getItem('admin_access_token'))
@@ -428,6 +497,23 @@ export default createStore({
console.error('Error:', error);
});
},
+ async updatePrescriptionStatus ({commit,state},payload){
+ commit('setLoading', true)
+ await axios.post(PATIENT_PRESCRIPTION_STATUS_UPDATE_API+payload.prescription_id ,{
+ status:payload.status
+ }, {
+ headers: {
+ 'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
+ }
+ }) .then(response => {
+ commit('setLoading', false)
+ commit('setPatientPrescriptionStatus',response.data);
+ })
+ .catch(error => {
+ commit('setLoading', false)
+ console.error('Error:', error);
+ });
+ },
async getAppointmentByIdAgent ({commit,state},payload){
commit('setLoading', true)
await axios.post(APPOINTMENT_DETAILS_API+payload.patient_id + '/' + payload.appointment_id, {}, {
@@ -890,6 +976,10 @@ export default createStore({
console.log('payload');
return state.showMessage
},
+
+ getSubcriptions(state){
+ return state.subcriptions
+ },
getPatientList(state){
return state.patientList
},
@@ -905,6 +995,9 @@ export default createStore({
getPatientLabKitStatus(state){
return state.patientLabKitStatus
},
+ getPatientPrescriptionStatus(state){
+ return state.patientPrescriptionStatus
+ },
getProvidersList(state){
return state.providersList
},
diff --git a/typed-router.d.ts b/typed-router.d.ts
index 4e1c78c..bf46953 100644
--- a/typed-router.d.ts
+++ b/typed-router.d.ts
@@ -148,6 +148,7 @@ declare module 'vue-router/auto/routes' {
'pages-icons': RouteRecordInfo<'pages-icons', '/pages/icons', Record, Record>,
'pages-misc-coming-soon': RouteRecordInfo<'pages-misc-coming-soon', '/pages/misc/coming-soon', Record, Record>,
'pages-misc-under-maintenance': RouteRecordInfo<'pages-misc-under-maintenance', '/pages/misc/under-maintenance', Record, Record>,
+ 'pages-patient-labkits-labkit': RouteRecordInfo<'pages-patient-labkits-labkit', '/pages/patient-labkits/labkit', Record, Record>,
'pages-patient-meetings-notes': RouteRecordInfo<'pages-patient-meetings-notes', '/pages/patient-meetings/notes', Record, Record>,
'pages-patient-meetings-prescription': RouteRecordInfo<'pages-patient-meetings-prescription', '/pages/patient-meetings/prescription', Record, Record>,
'pages-pricing': RouteRecordInfo<'pages-pricing', '/pages/pricing', Record, Record>,