Commit 3baca37d authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(rtl support and multilanguage): add rtl support to main.vue and multilanguage

parent f37b9bb2
Pipeline #845 passed with stages
in 150 minutes and 17 seconds
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<h5>©2005-{{ new Date().getFullYear() }} MARCO PACS</h5> <h5>©2005-{{ new Date().getFullYear() }} MARCO PACS</h5>
<!-- <v-menu transition="slide-x-transition"> <v-menu transition="slide-x-transition">
<template v-slot:activator="{ on }"> <template v-slot:activator="{ on }">
<v-btn <v-btn
class="changeLangBtn" class="changeLangBtn"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<v-list-item-title>{{lng.name}}</v-list-item-title> <v-list-item-title>{{lng.name}}</v-list-item-title>
</v-list-item> </v-list-item>
</v-list> </v-list>
</v-menu> --> </v-menu>
</v-footer> </v-footer>
</template> </template>
......
<template> <template>
<v-container> <v-container>
<v-snackbar color="primary" v-model="snackbar" top> <v-snackbar color="primary" v-model="snackbar" top>
Are You Sure? {{$t("Client.DeleteMessage")}}
<v-btn color="pink" @click="deleteClient">yes</v-btn> <v-btn color="pink" @click="deleteClient">{{$t("Client.YesBtn")}}</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn> <v-btn color="pink" @click="snackbar = false">{{$t("Client.NoBtn")}}</v-btn>
</v-snackbar> </v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar> <v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px"> <v-dialog v-model="dialog" max-width="600px">
<v-card> <v-card>
<v-card-title> <v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} Client</span> <span>{{newOrEdit=="new"?$t("Client.newText"):$t("Client.editText")}} {{$t("Client.clientName")}}</span>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-container> <v-container>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
color="blue darken-1" color="blue darken-1"
text text
@click="createOrEditClient" @click="createOrEditClient"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn> >{{newOrEdit=="new"?$t("Client.createBtn"):$t("Client.editBtn")}}</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
snackbar: false, snackbar: false,
alertSnackbar: false, alertSnackbar: false,
alertText: "", alertText: "",
loading:false loading: false
}; };
}, },
computed: { computed: {
...@@ -147,7 +147,6 @@ export default { ...@@ -147,7 +147,6 @@ export default {
} }
}, },
openNewDialog() { openNewDialog() {
for (let prop in this.ClientForm) { for (let prop in this.ClientForm) {
this.$set(this.ClientForm, prop, ""); this.$set(this.ClientForm, prop, "");
} }
...@@ -157,7 +156,7 @@ export default { ...@@ -157,7 +156,7 @@ export default {
}, },
openEditDialog() { openEditDialog() {
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of clients"); this.alertSnackbarMethod(this.$t("Client.clientSelectStatement"));
return; return;
} }
for (let prop in this.ClientForm) { for (let prop in this.ClientForm) {
...@@ -188,14 +187,14 @@ export default { ...@@ -188,14 +187,14 @@ export default {
let me = this; let me = this;
this.snackbar = false; this.snackbar = false;
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of clients"); me.alertSnackbarMethod(me.$t("Client.clientSelectStatement"));
return; return;
} }
let deleteHislink = {}; let deleteHislink = {};
deleteHislink._id = this.selectedItemInTable[0]["_id"]; deleteHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteClient", deleteHislink, function() { Meteor.call("deleteClient", deleteHislink, function() {
me.alertSnackbarMethod("Client has been deleted"); me.alertSnackbarMethod(this.$t("Client.clientDeleteStatement"));
}); });
}, },
deleteSnackbar() { deleteSnackbar() {
......
<template> <template>
<v-container> <v-container>
<v-snackbar color="primary" v-model="snackbar" top> <v-snackbar color="primary" v-model="snackbar" top>
Are You Sure? {{$t("DeviceMap.DeleteMessage")}}
<v-btn color="pink" @click="deleteDevicemap">yes</v-btn> <v-btn color="pink" @click="deleteDevicemap">{{$t("DeviceMap.YesBtn")}}</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn> <v-btn color="pink" @click="snackbar = false">{{$t("DeviceMap.NoBtn")}}</v-btn>
</v-snackbar> </v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar> <v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px"> <v-dialog v-model="dialog" max-width="600px">
<v-card> <v-card>
<v-card-title> <v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} DeviceMap</span> <span>{{newOrEdit=="new"?$t("DeviceMap.newText"):$t("DeviceMap.editText")}} {{$t("DeviceMap.devicemapName")}}</span>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-container> <v-container>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
color="blue darken-1" color="blue darken-1"
text text
@click="createOrEditDevicemap" @click="createOrEditDevicemap"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn> >{{newOrEdit=="new"?$t("DeviceMap.createBtn"):$t("DeviceMap.editBtn")}}</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
}, },
openEditDialog() { openEditDialog() {
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of devicemaps"); this.alertSnackbarMethod(this.$t("DeviceMap.devicemapSelectStatement"));
return; return;
} }
for (let prop in this.DevicemapForm) { for (let prop in this.DevicemapForm) {
...@@ -276,14 +276,14 @@ export default { ...@@ -276,14 +276,14 @@ export default {
let me = this; let me = this;
this.snackbar = false; this.snackbar = false;
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of devicemaps"); me.alertSnackbarMethod(me.$t("DeviceMap.devicemapSelectStatement"));
return; return;
} }
let deleteHislink = {}; let deleteHislink = {};
deleteHislink._id = this.selectedItemInTable[0]["_id"]; deleteHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteDevicemap", deleteHislink, function() { Meteor.call("deleteDevicemap", deleteHislink, function() {
me.alertSnackbarMethod("Devicemap has been deleted"); me.alertSnackbarMethod(me.$t("DeviceMap.devicemapDeleteStatement"));
}); });
}, },
deleteSnackbar() { deleteSnackbar() {
......
<template> <template>
<v-container fluid> <v-container fluid>
<v-snackbar color="primary" v-model="snackbar" top> <v-snackbar color="primary" v-model="snackbar" top>
Are You Sure? {{$t("HISLink.DeleteMessage")}}
<v-btn color="pink" @click="deleteHislink">yes</v-btn> <v-btn color="pink" @click="deleteHislink">{{$t("HISLink.YesBtn")}}</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn> <v-btn color="pink" @click="snackbar = false">{{$t("HISLink.NoBtn")}}</v-btn>
</v-snackbar> </v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar> <v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px"> <v-dialog v-model="dialog" max-width="600px">
<v-card> <v-card>
<v-card-title> <v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} HISLink</span> <span>{{newOrEdit=="new"?$t("HISLink.newText"):$t("HISLink.editText")}} {{$t("HISLink.HISLinkName")}}</span>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-container> <v-container>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
color="blue darken-1" color="blue darken-1"
text text
@click="createOrEditHisLink" @click="createOrEditHisLink"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn> >{{newOrEdit=="new"?$t("HISLink.createBtn"):$t("HISLink.editBtn")}}</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
}, },
openEditDialog() { openEditDialog() {
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of hislinks"); this.alertSnackbarMethod(this.$t("HISLink.hislinkSelectStatement"));
return; return;
} }
for (let prop in this.HisLinkForm) { for (let prop in this.HisLinkForm) {
...@@ -280,14 +280,14 @@ export default { ...@@ -280,14 +280,14 @@ export default {
let me = this; let me = this;
this.snackbar = false; this.snackbar = false;
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks"); me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return; return;
} }
let deleteHislink = {}; let deleteHislink = {};
deleteHislink._id = this.selectedItemInTable[0]["_id"]; deleteHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteHisLink", deleteHislink, function() { Meteor.call("deleteHisLink", deleteHislink, function() {
me.alertSnackbarMethod("HisLink has been deleted"); me.alertSnackbarMethod(me.$t("HISLink.hislinkDeleteStatement"));
}); });
}, },
deleteSnackbar() { deleteSnackbar() {
...@@ -300,33 +300,33 @@ export default { ...@@ -300,33 +300,33 @@ export default {
activeHislink() { activeHislink() {
let me = this; let me = this;
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks"); me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return; return;
} }
let activeHislink = {}; let activeHislink = {};
activeHislink._id = this.selectedItemInTable[0]["_id"]; activeHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("activeHisLink", activeHislink, function() { Meteor.call("activeHisLink", activeHislink, function() {
me.alertSnackbarMethod("HisLink has been activated"); me.alertSnackbarMethod(me.$t("HISLink.hislinkActiveStatement"));
}); });
}, },
deactiveHislink() { deactiveHislink() {
let me = this; let me = this;
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks"); me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return; return;
} }
let deactiveHislink = {}; let deactiveHislink = {};
deactiveHislink._id = this.selectedItemInTable[0]["_id"]; deactiveHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deactiveHisLink", deactiveHislink, function() { Meteor.call("deactiveHisLink", deactiveHislink, function() {
me.alertSnackbarMethod("HisLink has been deactivated"); me.alertSnackbarMethod(me.$t("HISLink.hislinkDeactiveStatement"));
}); });
}, },
authenticateHislink() { authenticateHislink() {
let me = this; let me = this;
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks"); me.alertSnackbarMethod(me.$t("HISLink.hislinkSelectStatement"));
return; return;
} }
let authenticateHislink = { let authenticateHislink = {
...@@ -360,12 +360,12 @@ export default { ...@@ -360,12 +360,12 @@ export default {
result result
) { ) {
if (err) { if (err) {
me.alertSnackbarMethod("authenticate failed"); me.alertSnackbarMethod(me.$t("HISLink.hislinkAuthenticateFailed"));
} }
me.alertSnackbarMethod( me.alertSnackbarMethod(
JSON.parse(result.content).Result == true JSON.parse(result.content).Result == true
? "authenticate success" ? me.$t("HISLink.hislinkAuthenticateSuccess")
: "authenticate failed" : me.$t("HISLink.hislinkAuthenticateFailed")
); );
}); });
} }
......
<template> <template>
<v-container> <v-container>
<v-snackbar color="primary" v-model="snackbar" top> <v-snackbar color="primary" v-model="snackbar" top>
Are You Sure? {{$t("Users.DeleteMessage")}}
<v-btn color="pink" @click="deleteUser">yes</v-btn> <v-btn color="pink" @click="deleteUser">{{$t("Users.YesBtn")}}</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn> <v-btn color="pink" @click="snackbar = false">{{$t("Users.NoBtn")}}</v-btn>
</v-snackbar> </v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar> <v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px"> <v-dialog v-model="dialog" max-width="600px">
<v-card> <v-card>
<v-card-title> <v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} User</span> <span>{{newOrEdit=="new"?$t("Users.newText"):$t("Users.editText")}} {{$t("Users.UserName")}}</span>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-container> <v-container>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
color="blue darken-1" color="blue darken-1"
text text
@click="createOrEditUser" @click="createOrEditUser"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn> >{{newOrEdit=="new"?$t("Users.createBtn"):$t("Users.editBtn")}}</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
newOrEdit: "", newOrEdit: "",
UserForm: { UserForm: {
username: "", username: "",
password:"", password: "",
_id: "" _id: ""
}, },
snackbar: false, snackbar: false,
...@@ -147,7 +147,7 @@ export default { ...@@ -147,7 +147,7 @@ export default {
}, },
openEditDialog() { openEditDialog() {
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of users"); this.alertSnackbarMethod(this.$t("Users.userSelectStatement"));
return; return;
} }
for (let prop in this.UserForm) { for (let prop in this.UserForm) {
...@@ -175,18 +175,18 @@ export default { ...@@ -175,18 +175,18 @@ export default {
} }
}, },
deleteUser() { deleteUser() {
debugger debugger;
let me = this; let me = this;
this.snackbar = false; this.snackbar = false;
if (this.selectedItemInTable.length == 0) { if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of users"); me.alertSnackbarMethod(this.$t("Users.userSelectStatement"));
return; return;
} }
let deleteUser = {}; let deleteUser = {};
deleteUser._id = this.selectedItemInTable[0]["_id"]; deleteUser._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteUser1", deleteUser, function() { Meteor.call("deleteUser1", deleteUser, function() {
me.alertSnackbarMethod("User has been deleted"); me.alertSnackbarMethod(this.$t("Users.userDeleteStatement"));
}); });
}, },
deleteSnackbar() { deleteSnackbar() {
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
alertSnackbarMethod(text) { alertSnackbarMethod(text) {
this.alertText = text; this.alertText = text;
this.alertSnackbar = true; this.alertSnackbar = true;
}, }
// beforeRouteEnter(to, from, next) { // beforeRouteEnter(to, from, next) {
// next(vm => { // next(vm => {
// if ( // if (
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
users: [] users: []
}, },
users() { users() {
return Meteor.users.find({username: { $ne: "marcoadmin" } }).fetch(); return Meteor.users.find({ username: { $ne: "marcoadmin" } }).fetch();
} }
} }
}; };
......
...@@ -83,6 +83,96 @@ ...@@ -83,6 +83,96 @@
<strong>{{$t('WorkList.editBtn')}}</strong> <strong>{{$t('WorkList.editBtn')}}</strong>
</v-btn> </v-btn>
<v-divider class="mx-4" inset vertical></v-divider> <v-divider class="mx-4" inset vertical></v-divider>
<v-btn color="rgb(94, 181, 177,.85)" class="white--text" @click="registerDialog=true">
<strong>{{$t("WorkList.Register")}}</strong>
</v-btn>
<v-dialog v-model="registerDialog" max-width="900px">
<v-card>
<v-progress-linear
:active="registerLoading"
:indeterminate="registerLoading"
absolute
top
color="cyan lighten-2"
></v-progress-linear>
<v-card-title>
<v-icon @click="closeRegisterPatient" class="mr-1">close</v-icon>
<span>{{$t("WorkList.RegisterPatient")}}</span>
</v-card-title>
<v-card-text class="ma-0 pa-0" v-if="$vuetify.breakpoint.mdAndUp">
<v-container class="cyan lighten-2" style="border-radius: 5px;">
<v-card class="pa-3 pr-6 ma-4">
<v-row dense>
<v-col md="4">
<v-text-field
label="FarsiFirstName"
v-model="registerPatient.FarsiFirstName"
type="text"
></v-text-field>
</v-col>
<v-col md="4">
<v-text-field
label="FarsiLastName"
v-model="registerPatient.FarsiLastName"
type="text"
></v-text-field>
</v-col>
<v-col md="4">
<v-text-field label="HISID" v-model="registerPatient.HISID" type="text"></v-text-field>
</v-col>
<v-col md="4">
<v-text-field
label="Modality"
v-model="registerPatient.Modality"
type="text"
></v-text-field>
</v-col>
<v-col md="4">
<v-text-field
label="PatientAge"
v-model="registerPatient.PatientAge"
type="text"
></v-text-field>
</v-col>
</v-row>
</v-card>
</v-container>
</v-card-text>
<v-card-text class="ma-0 pa-0" v-else>
<v-container class="cyan lighten-2" style="border-radius: 5px;">
<v-card class="pa-3 pr-6 ma-4">
<v-row dense>
<v-col cols="6">
<v-text-field label="FarsiFirstName" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="FarsiLastName" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="HISID" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="Modality" type="text"></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field label="PatientAge" type="text"></v-text-field>
</v-col>
</v-row>
</v-card>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="blue darken-1"
class="white--text"
@click="registerPatientMethod"
>{{$t("WorkList.CreatePatient")}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="editDialog" max-width="900px"> <v-dialog v-model="editDialog" max-width="900px">
<v-card class="grey lighten-4"> <v-card class="grey lighten-4">
...@@ -95,7 +185,7 @@ ...@@ -95,7 +185,7 @@
></v-progress-linear> ></v-progress-linear>
<v-card-title> <v-card-title>
<v-icon @click="close" class="mr-1">close</v-icon> <v-icon @click="close" class="mr-1">close</v-icon>
<span class="headline">Edit Patient Information</span> <span >{{$t("WorkList.EditRegisterPatient")}}</span>
</v-card-title> </v-card-title>
<v-card-text class="ma-0 pa-0" v-if="$vuetify.breakpoint.mdAndUp"> <v-card-text class="ma-0 pa-0" v-if="$vuetify.breakpoint.mdAndUp">
...@@ -514,6 +604,22 @@ import DeviceCode from "../../imports/api/collections/devicecode.js"; ...@@ -514,6 +604,22 @@ import DeviceCode from "../../imports/api/collections/devicecode.js";
import { Tracker } from "meteor/tracker"; import { Tracker } from "meteor/tracker";
export default { export default {
methods: { methods: {
registerPatientMethod(item) {
debugger;
let me = this;
this.registerLoading = true;
Meteor.call("Register", this.registerPatient, function(err, result) {
me.registerLoading = false;
me.registerPatient = {
FarsiFirstName: "",
FarsiLastName: "",
HISID: "",
Modality: "",
PatientAge: ""
};
me.closeRegisterPatient();
});
},
activerow: function(item) { activerow: function(item) {
if (this.sortByTable && this.sortByTable.length > 0) { if (this.sortByTable && this.sortByTable.length > 0) {
const items = this.patientsOfTable.sort((a, b) => { const items = this.patientsOfTable.sort((a, b) => {
...@@ -530,7 +636,6 @@ export default { ...@@ -530,7 +636,6 @@ export default {
return 0; return 0;
} }
}); });
console.log(items);
this.sortedItems = items; this.sortedItems = items;
} else { } else {
this.sortedItems = this.patientsOfTable; this.sortedItems = this.patientsOfTable;
...@@ -545,8 +650,11 @@ export default { ...@@ -545,8 +650,11 @@ export default {
// this.$set(item, "selected", true); // this.$set(item, "selected", true);
}, },
searchPatients() { searchPatients() {
debugger debugger;
if (this.selectedDevice && this.devicemap != this.selectedDevice.GroupName) { if (
this.selectedDevice &&
this.devicemap != this.selectedDevice.GroupName
) {
let self = this; let self = this;
Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() { Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() {
self.devicemap = self.selectedDevice.GroupName; self.devicemap = self.selectedDevice.GroupName;
...@@ -605,6 +713,9 @@ export default { ...@@ -605,6 +713,9 @@ export default {
close() { close() {
this.editDialog = false; this.editDialog = false;
}, },
closeRegisterPatient() {
this.registerDialog = false;
},
nextPatient() { nextPatient() {
let index = this.sortedItems.findIndex( let index = this.sortedItems.findIndex(
patient => patient._id == this.selectedItem._id patient => patient._id == this.selectedItem._id
...@@ -678,7 +789,7 @@ export default { ...@@ -678,7 +789,7 @@ export default {
}); });
let { selected, ...selectedItemClone } = this.selectedItem; let { selected, ...selectedItemClone } = this.selectedItem;
debugger debugger;
this.editLoading = true; this.editLoading = true;
let self = this; let self = this;
Meteor.call("EditworklistItem", selectedItemClone, function( Meteor.call("EditworklistItem", selectedItemClone, function(
...@@ -718,8 +829,17 @@ export default { ...@@ -718,8 +829,17 @@ export default {
FarsiLastNameParts1: "FarsiLastNameParts1", FarsiLastNameParts1: "FarsiLastNameParts1",
FarsiLastNameParts2: "FarsiLastNameParts2" FarsiLastNameParts2: "FarsiLastNameParts2"
}, },
registerPatient: {
FarsiFirstName: "",
FarsiLastName: "",
HISID: "",
Modality: "",
PatientAge: ""
},
registerLoading: false,
selectedItem: undefined, selectedItem: undefined,
sortedItems: undefined sortedItems: undefined,
registerDialog: false
}), }),
mounted() { mounted() {
Meteor.call("getDeviceCodes"); Meteor.call("getDeviceCodes");
...@@ -799,12 +919,13 @@ export default { ...@@ -799,12 +919,13 @@ export default {
watch: { watch: {
"$subReady.worklist"(ready) {}, "$subReady.worklist"(ready) {},
selectedDevice(newDevice, oldDevice) { selectedDevice(newDevice, oldDevice) {
debugger console.log(newDevice)
if (this.selectedDevice && this.selectedDevice.GroupName) { if (this.selectedDevice && this.selectedDevice.GroupName) {
let self = this; let self = this;
this.fetchWorklistLoading = true; this.fetchWorklistLoading = true;
Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() { Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() {
self.devicemap = self.selectedDevice.GroupName; self.devicemap = self.selectedDevice.GroupName;
console.log(self.devicemap);
self.fetchWorklistLoading = false; self.fetchWorklistLoading = false;
}); });
} }
......
...@@ -67,15 +67,68 @@ const messages = { ...@@ -67,15 +67,68 @@ const messages = {
deviceComboboxNoDataMatch1: '', deviceComboboxNoDataMatch1: '',
AllBtn: "All", AllBtn: "All",
UnknownBtn: "Correction Needed", UnknownBtn: "Correction Needed",
noDevicemap: 'no device' noDevicemap: 'no device',
Register: "Register",
CreatePatient: "Create",
RegisterPatient: "Register Patient",
EditRegisterPatient: "Edit Patient Information"
}, },
HISLink: { HISLink: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
HISLinkName: "HISLink",
createBtn: "Create",
newBtn: "New", newBtn: "New",
editBtn: "Edit", editBtn: "Edit",
deleteBtn: "Delete", deleteBtn: "Delete",
activeBtn: "Active", activeBtn: "Active",
deactiveBtn: "Deactive", deactiveBtn: "Deactive",
authenticateBtn: "Authenticate" authenticateBtn: "Authenticate",
hislinkSelectStatement: "please select one of hislinks",
hislinkDeleteStatement: "HisLink has been deleted",
hislinkActiveStatement: "HisLink has been activated",
hislinkDeactiveStatement: "HisLink has been deactivated",
hislinkAuthenticateFailed: "authenticate failed",
hislinkAuthenticateSuccess: "authenticate success"
},
Client: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
clientName: "Client",
createBtn: "Create",
editBtn: "Edit",
clientSelectStatement: "please select one of Clients",
clientDeleteStatement: "Client has been deleted",
},
DeviceMap: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
devicemapName: "DeviceMap",
createBtn: "Create",
editBtn: "Edit",
devicemapSelectStatement: "please select one of DeviceMaps",
devicemapDeleteStatement: "Devicemap has been deleted",
},
Users: {
DeleteMessage: "Are You Sure?",
YesBtn: "yes",
NoBtn: "no",
newText: "New",
editText: "Edit",
UserName: "Users",
createBtn: "Create",
editBtn: "Edit",
userSelectStatement: "please select one of users",
userDeleteStatement: "user has been deleted",
} }
}, },
...@@ -143,15 +196,69 @@ const messages = { ...@@ -143,15 +196,69 @@ const messages = {
deviceComboboxNoDataMatch1: 'یافت نشد', deviceComboboxNoDataMatch1: 'یافت نشد',
AllBtn: "همه", AllBtn: "همه",
UnknownBtn: "نیازمند اصلاح", UnknownBtn: "نیازمند اصلاح",
noDevicemap: 'دستگاه انتخاب نشده است' noDevicemap: 'دستگاه انتخاب نشده است',
Register: "ثبت",
CreatePatient: "ایجاد",
RegisterPatient: "ایجاد بیمار",
EditRegisterPatient: "ویرایش اطلاعات بیمار"
}, },
HISLink: { HISLink: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
HISLinkName: "HISLink",
createBtn: "ایجاد",
newBtn: "جدید", newBtn: "جدید",
editBtn: "ویرایش", editBtn: "ویرایش",
deleteBtn: "حذف", deleteBtn: "حذف",
activeBtn: "فعال", activeBtn: "فعال",
deactiveBtn: "غیرفعال", deactiveBtn: "غیرفعال",
authenticateBtn: "تصدیق کردن" authenticateBtn: "تصدیق کردن",
hislinkSelectStatement: "لطفا یکی از hislink ها را انتخاب نمایید",
hislinkDeleteStatement: "HISLink حذف گردید",
hislinkActiveStatement: "HISLink فعال شد",
hislinkDeactiveStatement: "HISLink غیرفعال شد",
hislinkAuthenticateFailed: "authenticate failed",
hislinkAuthenticateSuccess: "authenticate success"
},
Client: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
clientName: "Client",
createBtn: "ایجاد",
editBtn: "ویرایش",
clientSelectStatement: "لطفا یکی از Client ها را انتخاب نمایید",
clientDeleteStatement: "Client حذف گردید",
},
DeviceMap: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
devicemapName: "DeviceMap",
createBtn: "ایجاد",
editBtn: "ویرایش",
devicemapSelectStatement: "لطفا یکی از DeviceMap ها را انتخاب نمایید",
devicemapDeleteStatement: "DeviceMap حذف گردید",
},
Users: {
DeleteMessage: "آیا مطمین هستید؟",
YesBtn: "بله",
NoBtn: "نه",
newText: "جدید",
editText: "ویرایش",
UserName: "کاربر",
createBtn: "ایجاد",
editBtn: "ویرایش",
userSelectStatement: "لطفا یکی از کاربر ها را انتخاب نمایید",
userDeleteStatement: "کاربر حذف گردید",
} }
} }
......
...@@ -140,8 +140,8 @@ const routes = [{ ...@@ -140,8 +140,8 @@ const routes = [{
path: "worklist", path: "worklist",
name: "worklist", name: "worklist",
components: { components: {
default: WorkList,
edit_worklist: WorkList // edit_worklist: WorkList
} }
}, { }, {
path: "hislink", path: "hislink",
......
<template> <template>
<v-app id="inspire"> <v-app id="inspire">
<template v-if="!$vuetify.rtl"> <template v-if="!$vuetify.rtl">
<!-- <v-navigation-drawer v-model="drawerRight" app right clipped :width="$vuetify.breakpoint.width/3" bottom>
<v-list dense>
<v-list-item @click.stop="right = !right">
<v-list-item-action>
<v-icon>mdi-exit-to-app</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>-->
<!-- <keep-alive>
<router-view name="edit_worklist"></router-view>
</keep-alive>-->
<v-app-bar app clipped-left color="teal lighten-3" dark> <v-app-bar app clipped-left color="teal lighten-3" dark>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon> <v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-toolbar-title class="red--text">Karname</v-toolbar-title> <v-toolbar-title class="red--text">Karname</v-toolbar-title>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<!-- <v-app-bar-nav-icon @click.stop="drawerRight = !drawerRight"></v-app-bar-nav-icon> -->
</v-app-bar> </v-app-bar>
<!-- <v-navigation-drawer v-model="drawer" app clipped>
<v-list dense>
<v-list-item @click.stop="left = !left">
<v-list-item-action>
<v-icon>mdi-exit-to-app</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>left
</v-navigation-drawer>-->
<v-navigation-drawer v-model="drawer" app clipped> <v-navigation-drawer v-model="drawer" app clipped>
<v-list nav dense> <v-list nav dense>
<v-list-item-group v-model="item" color="primary"> <v-list-item-group v-model="item" color="primary">
...@@ -46,7 +13,6 @@ ...@@ -46,7 +13,6 @@
<!-- <v-list-item-icon> <!-- <v-list-item-icon>
<v-icon v-text="item.icon"></v-icon> <v-icon v-text="item.icon"></v-icon>
</v-list-item-icon>--> </v-list-item-icon>-->
<v-list-item-content> <v-list-item-content>
<v-list-item-title v-text="item.text"></v-list-item-title> <v-list-item-title v-text="item.text"></v-list-item-title>
</v-list-item-content> </v-list-item-content>
...@@ -56,56 +22,41 @@ ...@@ -56,56 +22,41 @@
</v-navigation-drawer> </v-navigation-drawer>
</template> </template>
<!-- <template v-if="$vuetify.rtl"> <template v-if="$vuetify.rtl">
<v-navigation-drawer v-model="drawer" app clipped> <v-app-bar app clipped-right color="teal lighten-3" dark>
<v-list dense>
<v-list-item @click.stop="left = !left">
<v-list-item-action>
<v-icon>mdi-exit-to-app</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>left
</v-navigation-drawer>
<v-app-bar app clipped-left color="teal lighten-3" dark>
<v-app-bar-nav-icon @click.stop="drawerRight = !drawerRight"></v-app-bar-nav-icon>
<v-spacer></v-spacer>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon> <v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-toolbar-title>Toolbar</v-toolbar-title> <v-toolbar-title class="red--text">Karname</v-toolbar-title>
</v-app-bar> <v-spacer></v-spacer>
<v-navigation-drawer v-model="drawerRight" app right> </v-app-bar>
<v-list dense> <v-navigation-drawer v-model="drawer" app clipped right>
<v-list-item @click.stop="right = !right"> <v-list nav dense>
<v-list-item-action> <v-list-item-group v-model="item" color="primary">
<v-icon>mdi-exit-to-app</v-icon> <v-list-item v-for="(item, i) in updatedItems" :key="i" :to="item.url">
</v-list-item-action> <!-- <v-list-item-icon>
<v-icon v-text="item.icon"></v-icon>
</v-list-item-icon>-->
<v-list-item-content> <v-list-item-content>
<v-list-item-title>Open Temporary Drawer</v-list-item-title> <v-list-item-title v-text="item.text"></v-list-item-title>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
</v-list>right </v-list-item-group>
</v-list>
</v-navigation-drawer> </v-navigation-drawer>
</template>--> </template>
<!-- <v-navigation-drawer v-model="left" fixed temporary></v-navigation-drawer> -->
<v-content> <v-content>
<transition name="fade" mode="out-in"> <transition name="fade" mode="out-in">
<router-view></router-view> <router-view></router-view>
</transition> </transition>
<transition name="fade" mode="out-in"> <!-- <transition name="fade" mode="out-in">
<keep-alive> <keep-alive>
<router-view name="edit_worklist"></router-view> <router-view name="edit_worklist"></router-view>
</keep-alive> </keep-alive>
</transition> </transition> -->
</v-content> </v-content>
<!-- <v-navigation-drawer v-model="right" fixed right temporary></v-navigation-drawer> -->
<app-footer></app-footer> <app-footer></app-footer>
</v-app> </v-app>
</template> </template>
......
import { Mongo } from 'meteor/mongo';
import { Meteor } from 'meteor/meteor';
let internalWorklist = 'internalWorklist';
let Worklist;
if (Meteor.isClient || Meteor.isCordova) {
Worklist = new Mongo.Collection(internalWorklist);
}
if (Meteor.isServer) {
Worklist = new Mongo.Collection(internalWorklist);
}
export default Worklist;
\ No newline at end of file
...@@ -3,14 +3,10 @@ import { Meteor } from 'meteor/meteor'; ...@@ -3,14 +3,10 @@ import { Meteor } from 'meteor/meteor';
let Worklist; let Worklist;
if (Meteor.isClient || Meteor.isCordova) { if (Meteor.isClient || Meteor.isCordova) {
Worklist = new Mongo.Collection('worklist') Worklist = new Mongo.Collection('tempworklist');
} }
if (Meteor.isServer) { if (Meteor.isServer) {
Worklist = new Mongo.Collection('worklist', { connection: null }) Worklist = new Mongo.Collection('tempworklist');
} }
export default Worklist; export default Worklist;
\ No newline at end of file
...@@ -3,19 +3,26 @@ import { check } from 'meteor/check'; ...@@ -3,19 +3,26 @@ import { check } from 'meteor/check';
import { Accounts } from 'meteor/accounts-base'; import { Accounts } from 'meteor/accounts-base';
import { HTTP } from 'meteor/http'; import { HTTP } from 'meteor/http';
let uuidv4 = require("uuid/v4");
// Accounts.onLogin(function(user) { // Accounts.onLogin(function(user) {
// debugger; // debugger;
// console.log(",", user.user._id) // console.log(",", user.user._id)
// }); // });
import Worklist from '../collections/worklist.js'; import Worklist from '../collections/worklist.js';
import InternalWorklist from '../collections/internalworklist.js';
let internalWorklistName = 'internalWorklist';
// import workListItemSchema from '../collections/worklistItemSchema.js'; // import workListItemSchema from '../collections/worklistItemSchema.js';
Meteor.methods({ Meteor.methods({
'Fetchworklist' (devicemap) { 'Fetchworklist' (devicemap) {
debugger
check(devicemap, String); check(devicemap, String);
if (devicemap.length == 0) {
return true;
}
this.unblock(); this.unblock();
if (this.userId) { if (this.userId) {
try { try {
...@@ -23,15 +30,18 @@ Meteor.methods({ ...@@ -23,15 +30,18 @@ Meteor.methods({
let worklistHttp = JSON.parse(result.content); let worklistHttp = JSON.parse(result.content);
Worklist.remove({ _userid: this.userId, _devicemap: devicemap }); Worklist.remove({ _userid: this.userId, _devicemap: devicemap });
worklistHttp.WorkListItems.forEach((patient) => { worklistHttp.WorkListItems.forEach((patient) => {
delete patient._id;
Worklist.insert({ Worklist.insert({
...patient, ...patient,
_userid: this.userId, _userid: this.userId,
_devicemap: devicemap _devicemap: devicemap
}); });
}) });
return true return true
} catch (e) { } catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range. // Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e);
return false; return false;
} }
} }
...@@ -83,7 +93,7 @@ Meteor.methods({ ...@@ -83,7 +93,7 @@ Meteor.methods({
// "StudyInstanceUID": "1.3.12.2.1107.5.2.30.26719.6.8122118808" // "StudyInstanceUID": "1.3.12.2.1107.5.2.30.26719.6.8122118808"
// } // }
// try { // try {
debugger;
if (this.userId) { if (this.userId) {
delete item._id; delete item._id;
// workListItemSchema.validate(item); // workListItemSchema.validate(item);
...@@ -97,9 +107,26 @@ Meteor.methods({ ...@@ -97,9 +107,26 @@ Meteor.methods({
const result = HTTP.call('POST', `${Meteor.settings.worklistUrl}/HISIntegration.svc/rest/EditworklistItem`, options); const result = HTTP.call('POST', `${Meteor.settings.worklistUrl}/HISIntegration.svc/rest/EditworklistItem`, options);
let result1 = JSON.parse(result.content); let result1 = JSON.parse(result.content);
delete result1._id; delete result1._id;
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: result1 }); let update = Worklist.update({ AdmissionID: result1.AdmissionID }, { $set: result1 }, { multi: true });
return true; return true;
} }
},
Register(item) {
if (this.userId) {
item._id = uuidv4();
InternalWorklist.insert({
...item
});
// Worklist.remove({ _userid: this.userId, _devicemap: internalWorklistName });
// Worklist.insert({
// ...item,
// _userid: this.userId,
// _devicemap: internalWorklistName
// });
return true;
}
} }
}); });
\ No newline at end of file
...@@ -8,7 +8,7 @@ Meteor.publish("devicemaps", function() { ...@@ -8,7 +8,7 @@ Meteor.publish("devicemaps", function() {
} }
return DeviceMap.find({}, { return DeviceMap.find({}, {
reactive: true, reactive: true,
disableOplog: false, disableOplog: true,
pollingThrottleMs: 1000, pollingThrottleMs: 1000,
pollingIntervalMs: 1000 pollingIntervalMs: 1000
}); });
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"git-describe": "^4.0.4", "git-describe": "^4.0.4",
"meteor-node-stubs": "^1.0.0", "meteor-node-stubs": "^1.0.0",
"simpl-schema": "^1.5.5", "simpl-schema": "^1.5.5",
"uuid": "^3.3.3",
"valid-url": "^1.0.9", "valid-url": "^1.0.9",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-fragment": "^1.5.1", "vue-fragment": "^1.5.1",
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"identity-obj-proxy": "^3.0.0", "identity-obj-proxy": "^3.0.0",
"jest": "^24.9.0", "jest": "^24.9.0",
"jest-cli": "^23.6.0", "jest-cli": "^25.0.0",
"less": "^3.10.3", "less": "^3.10.3",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"material-design-icons-iconfont": "^5.0.1", "material-design-icons-iconfont": "^5.0.1",
......
...@@ -24,6 +24,6 @@ Meteor.startup(() => { ...@@ -24,6 +24,6 @@ Meteor.startup(() => {
if (marcoUser == undefined || marcoUser == null) if (marcoUser == undefined || marcoUser == null)
Accounts.createUser({ Accounts.createUser({
username: 'marcoadmin', username: 'marcoadmin',
password: 'SysAdmin4.21' password: 'sysAdmin4.21'
}); });
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment