Commit d3f42b34 authored by Reza Sahebgharan's avatar Reza Sahebgharan

fix(register patient update): register patient update date

parent c597dd92
Pipeline #1004 passed with stage
in 38 minutes and 15 seconds
...@@ -46,7 +46,7 @@ build_in_staging: ...@@ -46,7 +46,7 @@ build_in_staging:
tags: tags:
- shell - shell
script: script:
- echo "starting build in devel-windows" - echo "starting build in staging"
- npm install - npm install
# - npm run test-jest # - npm run test-jest
- meteor build C:\output --directory --server-only - meteor build C:\output --directory --server-only
......
...@@ -48,10 +48,10 @@ ...@@ -48,10 +48,10 @@
<v-col md="4"> <v-col md="4">
<v-autocomplete <v-autocomplete
:items="itemsOfDeviceMap" :items="itemsOfDeviceMap"
label="DeviceMap" label="CodeInHIS"
v-model="selectedDeviceMap" v-model="selectedDeviceMap"
item-text="GroupName" item-text="GroupName"
item-value="GroupName" item-value="CodeInHIS"
return-object return-object
></v-autocomplete> ></v-autocomplete>
</v-col> </v-col>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<v-col cols="6"> <v-col cols="6">
<v-autocomplete <v-autocomplete
:items="itemsOfDeviceMap" :items="itemsOfDeviceMap"
label="DeviceMap" label="CodeInHIS"
v-model="selectedDeviceMap" v-model="selectedDeviceMap"
item-text="GroupName" item-text="GroupName"
item-value="CodeInHIS" item-value="CodeInHIS"
...@@ -146,12 +146,13 @@ export default { ...@@ -146,12 +146,13 @@ export default {
this.registerLoading = true; this.registerLoading = true;
let registerPatient = { let registerPatient = {
...this.registerPatient ...this.registerPatient
} };
if (this.selectedDeviceMap) { if (this.selectedDeviceMap) {
registerPatient.CodeInHIS = this.selectedDeviceMap.CodeInHIS; registerPatient.CodeInHis = this.selectedDeviceMap.CodeInHIS;
} }
Meteor.call("Register", registerPatient, function(err, result) { Meteor.call("Register", registerPatient, function(err, result) {
me.registerLoading = false; me.registerLoading = false;
me.registerPatient = { me.registerPatient = {
......
...@@ -152,7 +152,23 @@ const messages = { ...@@ -152,7 +152,23 @@ const messages = {
chooseLanguage: "please choose a language", chooseLanguage: "please choose a language",
successfullSave: "changes have been successfully saved", successfullSave: "changes have been successfully saved",
chooseImage: "please choose an image" chooseImage: "please choose an image"
},
NavigationBar: {
Worklist: "Worklist",
HISLink: "HISLink",
DeviceMap: "DeviceMap",
Client: "Client",
Users: "Users",
Setting: "Setting",
Signout: "Signout"
} }
// NavigationBar: {
// Worklist: "لیست کاری",
// HISLink: "درگاه HIS",
// DeviceMap: "نگاشت",
// Client: "دستگاه"
// }
}, },
'fa': { 'fa': {
Login: { Login: {
...@@ -305,6 +321,16 @@ const messages = { ...@@ -305,6 +321,16 @@ const messages = {
chooseLanguage: "لطفا یک زبان را انتخاب نمایید", chooseLanguage: "لطفا یک زبان را انتخاب نمایید",
successfullSave: "اطلاعات با موفقیت ذخیره گردید", successfullSave: "اطلاعات با موفقیت ذخیره گردید",
chooseImage: "لطفا یک عکس انتخاب نمایید" chooseImage: "لطفا یک عکس انتخاب نمایید"
},
NavigationBar: {
Worklist: "لیست کاری",
HISLink: "درگاه HIS",
DeviceMap: "نگاشت",
Client: "دستگاه",
Users: "کاربران",
Setting: "تنظیمات",
Signout: "خروج"
} }
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<v-icon>settings_applications</v-icon> <v-icon>settings_applications</v-icon>
</v-list-item-icon> </v-list-item-icon>
<v-list-item-content> <v-list-item-content>
<v-list-item-title>Setting</v-list-item-title> <v-list-item-title>{{$t("NavigationBar.Setting")}}</v-list-item-title>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
<v-list-item class="pl-10" @click="logoffUser"> <v-list-item class="pl-10" @click="logoffUser">
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<v-icon>exit_to_app</v-icon> <v-icon>exit_to_app</v-icon>
</v-list-item-icon> </v-list-item-icon>
<v-list-item-content> <v-list-item-content>
<v-list-item-title>Signout</v-list-item-title> <v-list-item-title>{{$t("NavigationBar.Signout")}}</v-list-item-title>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
</v-list-group> </v-list-group>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</v-list-item>--> </v-list-item>-->
<v-divider></v-divider> <v-divider></v-divider>
<v-list-item-group v-model="item" color="primary"> <v-list-item-group v-model="item" color="primary">
<v-list-item v-for="(item, i) in updatedItems" :key="i" :to="item.url"> <v-list-item v-for="(item, i) in updatedItems" :key="i" :to="item.url" class="pl-5">
<!-- <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>-->
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<v-icon>settings_applications</v-icon> <v-icon>settings_applications</v-icon>
</v-list-item-icon> </v-list-item-icon>
<v-list-item-content> <v-list-item-content>
<v-list-item-title>Setting</v-list-item-title> <v-list-item-title>{{$t("NavigationBar.Setting")}}</v-list-item-title>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
<v-list-item class="pr-10" @click="logoffUser"> <v-list-item class="pr-10" @click="logoffUser">
...@@ -110,13 +110,13 @@ ...@@ -110,13 +110,13 @@
<v-icon>exit_to_app</v-icon> <v-icon>exit_to_app</v-icon>
</v-list-item-icon> </v-list-item-icon>
<v-list-item-content> <v-list-item-content>
<v-list-item-title>Signout</v-list-item-title> <v-list-item-title>{{$t("NavigationBar.Signout")}}</v-list-item-title>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
</v-list-group> </v-list-group>
<v-divider></v-divider> <v-divider></v-divider>
<v-list-item-group v-model="item" color="primary"> <v-list-item-group v-model="item" color="primary">
<v-list-item v-for="(item, i) in updatedItems" :key="i" :to="item.url"> <v-list-item v-for="(item, i) in updatedItems" :key="i" :to="item.url" class="pr-5">
<!-- <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>-->
...@@ -151,6 +151,25 @@ import { Meteor } from "meteor/meteor"; ...@@ -151,6 +151,25 @@ import { Meteor } from "meteor/meteor";
import RegisterPatient from "../components/RegisterPatient.vue"; import RegisterPatient from "../components/RegisterPatient.vue";
import { mapActions } from "vuex"; import { mapActions } from "vuex";
export default { export default {
mounted() {
debugger;
this.items.push({
text: this.$t("NavigationBar.Worklist"),
url: "/main/worklist"
});
this.items.push({
text: this.$t("NavigationBar.HISLink"),
url: "/main/hislink"
});
this.items.push({
text: this.$t("NavigationBar.DeviceMap"),
url: "/main/devicemap"
});
this.items.push({
text: this.$t("NavigationBar.Client"),
url: "/main/client"
});
},
components: { components: {
"app-footer": AppFooter, "app-footer": AppFooter,
fragment: Fragment, fragment: Fragment,
...@@ -179,14 +198,23 @@ export default { ...@@ -179,14 +198,23 @@ export default {
this.users.length > 0 && this.users.length > 0 &&
Meteor.users.findOne({ _id: Meteor.userId() }).username == "marcoadmin" Meteor.users.findOne({ _id: Meteor.userId() }).username == "marcoadmin"
) { ) {
if (this.items.findIndex(item => item.text == "Users") < 0) if (
this.items.push({ text: "Users", url: "/main/users" }); this.items.findIndex(
item => item.text == this.$t("NavigationBar.Users")
) < 0
)
// this.items.push({ text: "Users", url: "/main/users" });
this.items.push({
text: this.$t("NavigationBar.Users"),
url: "/main/users"
});
} else { } else {
const index = this.items.indexOf("Users"); const index = this.items.indexOf(this.$t("NavigationBar.Users"));
if (index > -1) { if (index > -1) {
this.items.splice(index, 1); this.items.splice(index, 1);
} }
} }
return this.items; return this.items;
}, },
fullName: { fullName: {
...@@ -236,12 +264,37 @@ export default { ...@@ -236,12 +264,37 @@ export default {
left: false, left: false,
item: 0, item: 0,
items: [ items: [
{ text: "Worklist", url: "/main/worklist", icon: "mdi-folder" }, // { text: "Worklist", url: "/main/worklist", icon: "mdi-folder" },
{ text: "HISLink", url: "/main/hislink", icon: "mdi-account-multiple" }, // { text: "HISLink", url: "/main/hislink", icon: "mdi-account-multiple" },
{ text: "DeviceMap", url: "/main/devicemap", icon: "mdi-star" }, // { text: "DeviceMap", url: "/main/devicemap", icon: "mdi-star" },
{ text: "Client", url: "/main/client" } // { text: "Client", url: "/main/client" }
// Worklist: "لیست کاری",
// HISLink: "درگاه HIS",
// DeviceMap: "نگاشت",
// Client: "دستگاه"
] ]
}), }),
watch: {
"$vuetify.rtl"(newvalue, oldvalue) {
this.items = [];
this.items.push({
text: this.$t("NavigationBar.Worklist"),
url: "/main/worklist"
});
this.items.push({
text: this.$t("NavigationBar.HISLink"),
url: "/main/hislink"
});
this.items.push({
text: this.$t("NavigationBar.DeviceMap"),
url: "/main/devicemap"
});
this.items.push({
text: this.$t("NavigationBar.Client"),
url: "/main/client"
});
}
},
meteor: { meteor: {
$subscribe: { $subscribe: {
users: [] users: []
......
...@@ -111,9 +111,10 @@ Meteor.methods({ ...@@ -111,9 +111,10 @@ Meteor.methods({
return true; return true;
} }
}, },
Register(item) { "Register" (item) {
if (this.userId) { if (this.userId) {
item._id = uuidv4(); item._id = uuidv4();
item.PatientDate = new Date();
InternalWorklist.insert({ InternalWorklist.insert({
...item ...item
......
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