Commit d45904ab authored by Reza Sahebgharan's avatar Reza Sahebgharan

Edit Worklist WAD-6768

parent 8ffe8c66
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
{ {
"regenerator": true "regenerator": true
} }
],
[
"transform-remove-console"
] ]
] ]
} }
\ No newline at end of file
This diff is collapsed.
<head> <head>
<link rel="shortcut icon" type="image/png" href="/img/logo.png" />
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
......
html { html {
overflow-y: hidden !important; overflow-y: auto !important;
} }
body { body {
......
import SimpleSchema from 'simpl-schema';
const workListItemSchema = new SimpleSchema({
"Accession": String,
"AdmissionID": String,
"EnglishFirstName": String,
"EnglishFirstNameParts": [String],
"EnglishLastName": String,
"EnglishLastNameParts": [String],
"FarsiFirstName": String,
"FarsiFirstNameParts": [String],
"FarsiLastName": String,
"FarsiLastNameParts": [String],
"FarsiName": String,
"HISID": SimpleSchema.oneOf(String, Number),
"InstitutionAddress": String,
"InstitutionName": String,
"Modality": SimpleSchema.oneOf(String, Number),
"PPSStatus": Number,
"PatientAge": SimpleSchema.oneOf(String, Number),
"PatientBirthDate": String,
"PatientID": SimpleSchema.oneOf(String, Number),
"PatientWeight": SimpleSchema.oneOf(String, Number),
"PatinetSex": SimpleSchema.oneOf(String, Number),
"PatinetSize": SimpleSchema.oneOf(String, Number),
"PregnancyStatus": SimpleSchema.oneOf(String, Number),
"ProcedureID": SimpleSchema.oneOf(String, Number),
"ProcedureSteps": [String],
"ReferringPhysicianName": SimpleSchema.oneOf(String, Number),
"RequestedProcedureID": SimpleSchema.oneOf(String, Number),
"ScheduledStartDate": SimpleSchema.oneOf(String, Number),
"Smoking": Number,
"StudyInstanceUID": String
}, { requiredByDefault: false });
export default workListItemSchema;
\ No newline at end of file
...@@ -9,6 +9,9 @@ import { Accounts } from 'meteor/accounts-base'; ...@@ -9,6 +9,9 @@ import { Accounts } from 'meteor/accounts-base';
import Worklist from '../collections/worklist.js'; import Worklist from '../collections/worklist.js';
import workListItemSchema from '../collections/worklistItemSchema.js';
Meteor.methods({ Meteor.methods({
'Fetchworklist' (devicemap) { 'Fetchworklist' (devicemap) {
...@@ -23,13 +26,6 @@ Meteor.methods({ ...@@ -23,13 +26,6 @@ Meteor.methods({
Worklist.remove({ _userid: this.userId, _devicemap: devicemap }); Worklist.remove({ _userid: this.userId, _devicemap: devicemap });
// worklist.forEach((patient) => {
// Worklist.insert({ PatientID: worklist.PatientID, _userid: worklist._userid, _devicemap: devicemap }, {
// $set: {
// ...patient
// }
// });
// })
worklistHttp.WorkListItems.forEach((patient) => { worklistHttp.WorkListItems.forEach((patient) => {
...@@ -40,15 +36,82 @@ Meteor.methods({ ...@@ -40,15 +36,82 @@ Meteor.methods({
}); });
}) })
// worklist._userid = this.userId;
// worklist._devicemap = devicemap;
// Worklist.upsert({ _userid: worklist._userid, _devicemap: devicemap }, { $set: worklist });
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.
return false; return false;
} }
} }
},
"EditworklistItem" (item) {
// debugger;
// const item = {
// "Accession": "",
// "AdmissionID": "1501",
// "EnglishFirstName": "SHOOSHAN",
// "EnglishFirstNameParts": [
// "SHOOSHAN"
// ],
// "EnglishLastName": "????? KHAZER ABADI",
// "EnglishLastNameParts": [
// "KHASHILO",
// "KHAZER",
// "ABADI"
// ],
// "FarsiFirstName": "شوشان",
// "FarsiFirstNameParts": [
// "شوشان"
// ],
// "FarsiLastName": "خشيلو خزر ابادي",
// "FarsiLastNameParts": [
// "خشيلو",
// "خزر",
// "ابادي"
// ],
// "FarsiName": "شوشان^خشيلو خزر ابادي",
// "HISID": null,
// "InstitutionAddress": null,
// "InstitutionName": null,
// "Modality": "",
// "PPSStatus": 0,
// "PatientAge": "67",
// "PatientBirthDate": "1990/01/01",
// "PatientID": "132748",
// "PatientWeight": 0,
// "PatinetSex": "0",
// "PatinetSize": 0,
// "PregnancyStatus": 4,
// "ProcedureID": null,
// "ProcedureSteps": [],
// "ReferringPhysicianName": null,
// "RequestedProcedureID": "1501",
// "ScheduledStartDate": null,
// "Smoking": 2,
// "StudyInstanceUID": "1.3.12.2.1107.5.2.30.26719.6.8122118808"
// }
// try {
debugger;
delete item._id;
workListItemSchema.validate(item);
var options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
const result = HTTP.call('POST', `http://192.168.0.156/Broker/HISIntegration.svc/rest/EditworklistItem`, options);
// console.log(result);
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: JSON.parse(result.content) });
console.log(update);
return true;
// }
// catch (e) {
// }
} }
}); });
\ No newline at end of file
This diff is collapsed.
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"connect-route": "^0.1.5", "connect-route": "^0.1.5",
"fibers": "^4.0.1", "fibers": "^4.0.1",
"meteor-node-stubs": "^1.0.0", "meteor-node-stubs": "^1.0.0",
"simpl-schema": "^1.5.5",
"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",
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
"@babel/register": "^7.5.5", "@babel/register": "^7.5.5",
"@mdi/font": "^3.9.97", "@mdi/font": "^3.9.97",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"babel-plugin-transform-remove-console": "^6.9.4",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"css-loader": "^3.2.0", "css-loader": "^3.2.0",
"deepmerge": "^4.0.0", "deepmerge": "^4.0.0",
......
...@@ -3,6 +3,9 @@ import { Meteor } from 'meteor/meteor'; ...@@ -3,6 +3,9 @@ import { Meteor } from 'meteor/meteor';
import '../imports/api/methods/worklist.js'; import '../imports/api/methods/worklist.js';
import '../imports/api/methods/changePassword.js'; import '../imports/api/methods/changePassword.js';
import '../imports/api/methods/devicecode.js'; import '../imports/api/methods/devicecode.js';
import '../imports/api/server/publications/worklist.js'; import '../imports/api/server/publications/worklist.js';
import '../imports/api/server/publications/devicecode.js'; import '../imports/api/server/publications/devicecode.js';
......
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