Commit f6791526 authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(HisLink UI and Back): write HISLink UI and Backend

parent 415dc979
## Prerequisite
- windows version must be 1809 and above.
- windows version must be 1809.
- enable hyper-v and container on windows features
- install docker for desktop on windows
- go to icon tray on windows and right click on docker icon, then click on option 'switch to windows containers...'
......@@ -49,6 +49,8 @@ services:
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker"}'
mongo:
ports:
- '27017:27017'
image: repo.marcopacs.com/karname/mongo-windows
volumes:
- D:\data\db:C:\data\db
......
......@@ -6,10 +6,10 @@
elevation="24"
class="d-flex justify-center align-center text-center red--text"
>
<v-card-text>
</v-card-text>
<v-menu transition="slide-x-transition">
<h5>©2005-{{ new Date().getFullYear() }} MARCO PACS</h5>
<!-- <v-menu transition="slide-x-transition">
<template v-slot:activator="{ on }">
<v-btn
class="changeLangBtn"
......@@ -25,8 +25,8 @@
<v-list-item-title>{{lng.name}}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<h5>©2005-{{ new Date().getFullYear() }} MARCO PACS</h5>
</v-menu> -->
</v-footer>
</template>
......@@ -55,4 +55,3 @@ export default {
}
</style>
</style>
\ No newline at end of file
<template>
<div>
DeviceMap
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<v-container fluid>
<v-snackbar color="primary" v-model="snackbar" top>
Are You Sure?
<v-btn color="pink" @click="deleteHislink">yes</v-btn>
<v-btn color="pink" @click="snackbar = false">no</v-btn>
</v-snackbar>
<v-snackbar color="primary" v-model="alertSnackbar" :timeout="2000">{{alertText}}</v-snackbar>
<v-dialog v-model="dialog" max-width="600px">
<v-card>
<v-card-title>
<span class="headline">{{newOrEdit=="new"?"New":"Edit"}} HISLink</span>
</v-card-title>
<v-card-text>
<v-container>
<v-row dense>
<v-col cols="12" md="6">
<v-text-field label="Name" v-model="HisLinkForm.Name"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-autocomplete :items="itemsOfBrands" label="Brand" v-model="HisLinkForm.Brand"></v-autocomplete>
</v-col>
<v-col cols="12" md="6">
<v-text-field label="UserName" type="text" v-model="HisLinkForm.UserName"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field label="Password" type="text" v-model="HisLinkForm.Password"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field label="Address" type="text" v-model="HisLinkForm.Address"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field label="Database Name" type="text" v-model="HisLinkForm.DataBaseName"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field
label="Link Server Name"
type="text"
v-model="HisLinkForm.LinkServerName"
></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field label="Schema" type="text" v-model="HisLinkForm.Schema"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field
label="CaseId Expression"
type="text"
v-model="HisLinkForm.CaseIdExpression"
>></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field
label="Transform Expression"
type="text"
v-model="HisLinkForm.TransformExpression"
></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field
label="Source Expression"
type="text"
v-model="HisLinkForm.SourceExpression"
></v-text-field>
</v-col>
<v-col cols="12">
<v-textarea
label="Description"
type="text"
v-model="HisLinkForm.Description"
height="150px"
hide-details
no-resize
readonly
></v-textarea>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="blue darken-1"
text
@click="createOrEditHisLink"
>{{newOrEdit=="new"?"Create":"Edit"}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-row justify="center" dense class="flex-wrap mb-6">
<v-col md="7" lg="6" cols="12">
<v-card tile>
<v-card-actions>
<v-row style="margin:auto">
<v-col cols="12" class="d-flex justify-space-around align-center flex-wrap">
<v-btn color="success" @click="openNewDialog">
<strong>{{$t("HISLink.newBtn")}}</strong>
</v-btn>
<v-btn color="success" @click="openEditDialog">
<strong>{{$t("HISLink.editBtn")}}</strong>
</v-btn>
<v-btn color="success" @click="deleteSnackbar">
<strong>{{$t("HISLink.deleteBtn")}}</strong>
</v-btn>
<v-btn color="success" @click="activeHislink">
<strong>{{$t("HISLink.activeBtn")}}</strong>
</v-btn>
<v-btn color="success" @click="deactiveHislink">
<strong>{{$t("HISLink.deactiveBtn")}}</strong>
</v-btn>
<v-btn color="success" @click="authenticateHislink">
<strong>{{$t("HISLink.authenticateBtn")}}</strong>
</v-btn>
</v-col>
</v-row>
</v-card-actions>
</v-card>
</v-col>
</v-row>
<v-row justify="center" dense class="flex-wrap mt-6">
<v-col md="9" cols="12">
<v-data-table
ref="patientsDatatable"
v-model="selectedItemInTable"
:headers="headerOfTable"
:items="itemsOfTable"
item-key="_id"
class="elevation-1"
style="width:100%"
fixed-header
hide-default-footer
disable-pagination
show-select
single-select
:sort-by.sync="sortByTable"
:sort-desc.sync="sortDescTable"
height="73vh"
></v-data-table>
</v-col>
</v-row>
</v-container>
</template>
<script>
import HisLink from "../../imports/api/collections/hislink.js";
import Brands from "../../imports/api/collections/brands.js";
import { Meteor } from "meteor/meteor";
export default {
data() {
return {
sortByTable: undefined,
sortDescTable: undefined,
selectedItemInTable: [],
dialog: false,
newOrEdit: "",
HisLinkForm: {
Name: "",
Brand: "",
UserName: "",
Password: "",
Address: "",
DataBaseName: "",
LinkServerName: "",
Schema: "",
CaseIdExpression: "",
TransformExpression: "",
SourceExpression: "",
Description: "",
_id: ""
},
snackbar: false,
alertSnackbar: false,
alertText: ""
};
},
mounted() {
debugger;
Meteor.call("getBrands");
},
computed: {
headerOfTable() {
let headers = [
"Name",
"Brand",
"UserName",
"Address",
"DataBaseName",
"LinkServerName",
"Schema",
"CaseIdExpression",
"TransformExpression",
"SourceExpression",
"Active"
];
let headerObjs = [];
for (let header of headers) {
headerObjs.push({
text: header,
value: header,
class: "text-center",
width: 180
});
}
return headerObjs;
},
itemsOfTable() {
this.dialog = false;
if (this.hislink && this.hislink.length > 0) {
return this.hislink;
}
return [];
},
itemsOfBrands() {
if (this.brands && this.brands.length > 0) {
return this.brands.map(brand => {
return brand.Name;
});
}
return [];
}
},
methods: {
openNewDialog() {
for (let prop in this.HisLinkForm) {
this.$set(this.HisLinkForm, prop, "");
}
this.$set(this.HisLinkForm, "_id", "");
this.newOrEdit = "new";
this.dialog = true;
},
openEditDialog() {
if (this.selectedItemInTable.length == 0) {
this.alertSnackbarMethod("please select one of hislinks");
return;
}
for (let prop in this.HisLinkForm) {
if (this.selectedItemInTable[0][prop] != undefined) {
this.$set(this.HisLinkForm, prop, this.selectedItemInTable[0][prop]);
}
}
this.$set(this.HisLinkForm, "_id", this.selectedItemInTable[0]["_id"]);
this.newOrEdit = "edit";
this.dialog = true;
},
createOrEditHisLink() {
let me = this;
if (this.newOrEdit == "new") {
Meteor.call("createHisLink", this.HisLinkForm, function() {
// me.dialog = false;
});
}
if (this.newOrEdit == "edit") {
Meteor.call("editHisLink", this.HisLinkForm, function() {
// me.dialog = false;
me.selectedItemInTable = [];
});
}
},
deleteHislink() {
let me = this;
this.snackbar = false;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
return;
}
let deleteHislink = {};
deleteHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deleteHisLink", deleteHislink, function() {
me.alertSnackbarMethod("HisLink has been deleted");
});
},
deleteSnackbar() {
this.snackbar = true;
},
alertSnackbarMethod(text) {
this.alertText = text;
this.alertSnackbar = true;
},
activeHislink() {
let me = this;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
return;
}
let activeHislink = {};
activeHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("activeHisLink", activeHislink, function() {
me.alertSnackbarMethod("HisLink has been activated");
});
},
deactiveHislink() {
let me = this;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
return;
}
let deactiveHislink = {};
deactiveHislink._id = this.selectedItemInTable[0]["_id"];
Meteor.call("deactiveHisLink", deactiveHislink, function() {
me.alertSnackbarMethod("HisLink has been deactivated");
});
},
authenticateHislink() {
let me = this;
if (this.selectedItemInTable.length == 0) {
me.alertSnackbarMethod("please select one of hislinks");
return;
}
let authenticateHislink = {
HISLink: {
...this.selectedItemInTable[0]
}
};
// let authenticateHislink = {
// HISLink: {
// _id: "5def5c2bd2a494489d9dfee4",
// Name: "Broker",
// Brand: "TestWLS",
// Address: "192.168.0.15",
// UserName: "HISROUser",
// Password: "800400",
// Description:
// "CaseInfo Query =>\nselect * from ServicesForPACS where RecordNo='{0}'\n---------\nRe portInfo Query =>\n---------\nWorkList Query =>",
// DatabaseName: "mv",
// Active: true,
// LinkServerName: null,
// MatchExpression: null,
// TransformExpression: null,
// SourceExpression: null,
// Schema: null,
// HDRef: null
// }
// };
Meteor.call("authenticateHisLink", authenticateHislink, function(
err,
result
) {
if (err){
debugger
me.alertSnackbarMethod("authenticate failed");
}
me.alertSnackbarMethod(
JSON.parse(result.content).Result == true
? "authenticate success"
: "authenticate failed"
);
});
}
},
meteor: {
$subscribe: {
hislink: [],
brands: []
},
hislink() {
return HisLink.find({}).fetch();
},
brands() {
console.log(Brands.find({}).fetch());
return Brands.find({}).fetch();
}
},
watch: {
"HisLinkForm.Brand"(newvalue, oldvalue) {
let selectedBrand = this.brands.filter(brand => {
return brand.Name == newvalue;
});
this.HisLinkForm.Description = selectedBrand[0].InfoGetter;
}
}
};
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -17,8 +17,8 @@
clearable
dense
class="ma-4"
item-text="Text"
item-value="Value"
item-text="GroupName"
item-value="GroupName"
return-object
>
<template v-if="noDataCombo" v-slot:no-data>
......@@ -441,7 +441,6 @@
<div class="v-data-table__mobile-row__header">EnglishFirstName</div>
<div class="v-data-table__mobile-row__cell">
<v-btn
:class="{
'red--text': item.EnglishFirstName.includes('?'),
'blue--text':!item.EnglishFirstName.includes('?'),
......@@ -459,7 +458,6 @@
<div class="v-data-table__mobile-row__header">EnglishLastName</div>
<div class="v-data-table__mobile-row__cell">
<v-btn
:class="{
'red--text': item.EnglishLastName.includes('?'),
'blue--text':!item.EnglishLastName.includes('?'),
......@@ -547,11 +545,11 @@ export default {
// this.$set(item, "selected", true);
},
searchPatients() {
if (this.selectedDevice && this.devicemap != this.selectedDevice.Value) {
debugger
if (this.selectedDevice && this.devicemap != this.selectedDevice.GroupName) {
let self = this;
Meteor.call("Fetchworklist", this.selectedDevice.Value, function() {
self.devicemap = self.selectedDevice.Value;
Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() {
self.devicemap = self.selectedDevice.GroupName;
});
}
......@@ -680,7 +678,7 @@ export default {
});
let { selected, ...selectedItemClone } = this.selectedItem;
debugger
this.editLoading = true;
let self = this;
Meteor.call("EditworklistItem", selectedItemClone, function(
......@@ -688,8 +686,6 @@ export default {
result
) {
self.editLoading = false;
console.log(result);
//alert(error);
});
}
},
......@@ -731,6 +727,9 @@ export default {
},
computed: {
deviceCodeItems() {
// return this.devicecode.map(device => {
// return device.GroupName;
// });
return this.devicecode;
},
headerOfTable() {
......@@ -800,11 +799,12 @@ export default {
watch: {
"$subReady.worklist"(ready) {},
selectedDevice(newDevice, oldDevice) {
if (this.selectedDevice && this.selectedDevice.Value) {
debugger
if (this.selectedDevice && this.selectedDevice.GroupName) {
let self = this;
this.fetchWorklistLoading = true;
Meteor.call("Fetchworklist", this.selectedDevice.Value, function() {
self.devicemap = self.selectedDevice.Value;
Meteor.call("Fetchworklist", this.selectedDevice.GroupName, function() {
self.devicemap = self.selectedDevice.GroupName;
self.fetchWorklistLoading = false;
});
}
......
......@@ -68,6 +68,14 @@ const messages = {
AllBtn: "All",
UnknownBtn: "Correction Needed",
noDevicemap: 'no device'
},
HISLink: {
newBtn: "New",
editBtn: "Edit",
deleteBtn: "Delete",
activeBtn: "Active",
deactiveBtn: "Deactive",
authenticateBtn: "Authenticate"
}
},
......@@ -136,6 +144,14 @@ const messages = {
AllBtn: "همه",
UnknownBtn: "نیازمند اصلاح",
noDevicemap: 'دستگاه انتخاب نشده است'
},
HISLink: {
newBtn: "جدید",
editBtn: "ویرایش",
deleteBtn: "حذف",
activeBtn: "فعال",
deactiveBtn: "غیرفعال",
authenticateBtn: "تصدیق کردن"
}
}
......
......@@ -100,6 +100,8 @@ import Main from '../views/Main.vue';
import EditWorkList from '../components/EditWorkList.vue';
import WorkList from '../components/Worklist.vue';
import HisLink from '../components/HisLink.vue';
import DeviceMap from '../components/DeviceMap.vue';
import AppVersion from '../views/AppVersion.vue';
......@@ -138,6 +140,14 @@ const routes = [{
default: WorkList,
edit_worklist: EditWorkList
}
}, {
path: "hislink",
name: "hislink",
component: HisLink
}, {
path: "devicemap",
name: "devicemap",
component: DeviceMap
}]
}
];
......
......@@ -18,14 +18,14 @@
<router-view name="edit_worklist"></router-view>
</keep-alive>-->
<v-app-bar app clipped-right color="teal lighten-3" dark>
<v-app-bar app clipped-left color="teal lighten-3" dark>
<v-toolbar-title class="red--text">Karname</v-toolbar-title>
<!-- <v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon> -->
<v-spacer></v-spacer>
<!-- <v-app-bar-nav-icon @click.stop="drawerRight = !drawerRight"></v-app-bar-nav-icon> -->
</v-app-bar>
<!-- <v-navigation-drawer v-model="drawer" app>
<!-- <v-navigation-drawer v-model="drawer" app clipped>
<v-list dense>
<v-list-item @click.stop="left = !left">
<v-list-item-action>
......@@ -37,6 +37,22 @@
</v-list-item>
</v-list>left
</v-navigation-drawer>-->
<v-navigation-drawer v-model="drawer" app clipped>
<v-list nav dense>
<v-list-item-group v-model="item" color="primary">
<v-list-item v-for="(item, i) in items" :key="i" :to="item.url">
<!-- <v-list-item-icon>
<v-icon v-text="item.icon"></v-icon>
</v-list-item-icon>-->
<v-list-item-content>
<v-list-item-title v-text="item.text"></v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list-item-group>
</v-list>
</v-navigation-drawer>
</template>
<!-- <template v-if="$vuetify.rtl">
......@@ -74,14 +90,13 @@
</v-navigation-drawer>
</template>-->
<v-navigation-drawer v-model="left" fixed temporary></v-navigation-drawer>
<v-content>
<router-view></router-view>
</v-content>
<!-- <v-navigation-drawer v-model="left" fixed temporary></v-navigation-drawer> -->
<v-navigation-drawer v-model="right" fixed right temporary></v-navigation-drawer>
<v-content>
<router-view></router-view>
</v-content>
<!-- <v-navigation-drawer v-model="right" fixed right temporary></v-navigation-drawer> -->
<app-footer></app-footer>
</v-app>
......@@ -102,7 +117,14 @@ export default {
drawer: null,
drawerRight: null,
right: false,
left: false
left: false,
item: 0,
items: [
{ text: "Worklist",url:"/main/worklist", icon: "mdi-folder" },
{ text: "HISLink", url:"/main/hislink",icon: "mdi-account-multiple" },
{ text: "DeviceMap",url:"/main/devicemap" ,icon: "mdi-star" },
]
})
};
</script>
\ No newline at end of file
version: '3'
version: "3"
services:
app:
container_name: karname-app
restart: always
image: 'karname-app:${TAG_VERSION}'
image: "karname-app:${TAG_VERSION}"
ports:
- '80:3000'
- "80:3000"
depends_on:
- mongo
links:
links:
- mongo
environment:
ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo:27017/karname
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker"}'
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
mongo:
container_name: mongo-windows
image: repo.marcopacs.com/karname/mongo-windows
volumes:
- C:\data\db:C:\data\db
volumes:
data:
networks:
default:
external:
......
import { Mongo } from 'meteor/mongo';
import { Meteor } from 'meteor/meteor';
let Brands;
if (Meteor.isClient || Meteor.isCordova) {
Brands = new Mongo.Collection('brands');
}
if (Meteor.isServer) {
Brands = new Mongo.Collection('brands', { connection: null });
}
export default Brands;
\ No newline at end of file
import { Mongo } from 'meteor/mongo';
import { Meteor } from 'meteor/meteor';
let HisLink;
if (Meteor.isClient || Meteor.isCordova) {
HisLink = new Mongo.Collection('HisLink')
}
if (Meteor.isServer) {
HisLink = new Mongo.Collection('HisLink')
}
export default HisLink;
\ No newline at end of file
......@@ -31,7 +31,9 @@ const workListItemSchema = new SimpleSchema({
"RequestedProcedureID": SimpleSchema.oneOf(String, Number),
"ScheduledStartDate": SimpleSchema.oneOf(String, Number),
"Smoking": Number,
"StudyInstanceUID": String
"StudyInstanceUID": String,
"Status": Number,
"UniqueHash": String
}, { requiredByDefault: false });
export default workListItemSchema;
\ No newline at end of file
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { HTTP } from 'meteor/http';
import Brands from '../collections/brands.js';
Meteor.methods({
'getBrands' () {
debugger;
this.unblock();
if (this.userId) {
try {
const result = HTTP.call('GET', `${Meteor.settings.worklistUrl}/HISIntegration.svc/rest/GetHISBrandsRest`);
// const result = HTTP.call("GET", "http://192.168.2.105/Broker/HISIntegration.svc/rest/GetHISBrandsRest");
let brandsHttpResult = JSON.parse(result.content);
Brands.remove({});
brandsHttpResult.Items.forEach((brand) => {
Brands.insert({
...brand
});
});
return true
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
return false;
}
}
}
});
\ No newline at end of file
......@@ -4,7 +4,6 @@ import { HTTP } from 'meteor/http';
import DeviceCode from '../collections/devicecode.js';
Meteor.methods({
'getDeviceCodes' () {
debugger;
this.unblock();
if (this.userId) {
try {
......
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { HTTP } from 'meteor/http';
Meteor.methods({
'createHisLink' (item) {
this.unblock();
if (this.userId) {
try {
let options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
const result = HTTP.call("POST", `${Meteor.settings.databusUrl}/hislink/create`, options);
return true
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e)
return false;
}
}
},
"editHisLink" (item) {
this.unblock();
if (this.userId) {
try {
let options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
const result = HTTP.call("POST", `${Meteor.settings.databusUrl}/hislink/update`, options);
return true
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e)
return false;
}
}
},
"deleteHisLink" (item) {
this.unblock();
if (this.userId) {
try {
let options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
const result = HTTP.call("POST", `${Meteor.settings.databusUrl}/hislink/delete`, options);
return true
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e)
return false;
}
}
},
"activeHisLink" (item) {
this.unblock();
if (this.userId) {
try {
let options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
const result = HTTP.call("POST", `${Meteor.settings.databusUrl}/hislink/active`, options);
return true
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e)
return false;
}
}
},
"deactiveHisLink" (item) {
this.unblock();
if (this.userId) {
try {
let options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
const result = HTTP.call("POST", `${Meteor.settings.databusUrl}/hislink/deactive`, options);
return true
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e)
return false;
}
}
},
"authenticateHisLink" (item) {
this.unblock();
if (this.userId) {
try {
let options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
const result = HTTP.call("POST", `${Meteor.settings.databusUrl}/hislink/authenticate`, options);
return result;
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console.log(e)
throw new Meteor.Error(500, "error");
}
}
}
});
\ No newline at end of file
......@@ -14,7 +14,7 @@ import workListItemSchema from '../collections/worklistItemSchema.js';
Meteor.methods({
'Fetchworklist' (devicemap) {
debugger
check(devicemap, String);
this.unblock();
if (this.userId) {
......@@ -86,7 +86,6 @@ Meteor.methods({
if (this.userId) {
delete item._id;
workListItemSchema.validate(item);
var options = {
data: item,
headers: {
......@@ -94,19 +93,12 @@ Meteor.methods({
'Accept': 'application/json'
}
}
const result = HTTP.call('POST', `${Meteor.settings.worklistUrl}/HISIntegration.svc/rest/EditworklistItem`, options);
// console.log(result);
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: JSON.parse(result.content) });
console.log(update);
let result1 = JSON.parse(result.content);
delete result1._id;
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: result1 });
return true;
}
// }
// catch (e) {
// }
}
});
\ No newline at end of file
import Brands from '../../collections/brands.js';
import { check } from 'meteor/check';
Meteor.publish("brands", function() {
if (!this.userId) {
return this.ready();
}
return Brands.find({});
});
\ No newline at end of file
import HisLink from '../../collections/hislink.js';
import { check } from 'meteor/check';
Meteor.publish("hislink", function() {
if (!this.userId) {
return this.ready();
}
return HisLink.find({});
});
\ No newline at end of file
......@@ -3,7 +3,7 @@
"private": true,
"version": "0.0.7",
"scripts": {
"start": "meteor run --inspect --settings settings.json",
"start": "SET MONGO_URL=mongodb://127.0.0.1:27017/karname&& meteor run --inspect --settings settings.json",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"test-jest": "jest",
......@@ -106,4 +106,4 @@
"!**/__mock__/**"
]
}
}
}
\ No newline at end of file
......@@ -3,8 +3,13 @@ import { Meteor } from 'meteor/meteor';
import '../imports/api/methods/worklist.js';
import '../imports/api/methods/changePassword.js';
import '../imports/api/methods/devicecode.js';
import '../imports/api/methods/brands.js';
import '../imports/api/methods/hisLink.js';
import '../imports/api/server/publications/worklist.js';
import '../imports/api/server/publications/devicecode.js';
import '../imports/api/server/publications/hislink.js';
import '../imports/api/server/publications/brands.js'
Meteor.startup(() => {
......
{
"worklistUrl": "http://staging.karname.ir:8086"
"worklistUrl": "http://192.168.0.66:8086",
"databusUrl": "http://localhost:8090"
}
\ 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