Commit f74bfe06 authored by Adrien PARROT's avatar Adrien PARROT
Browse files

first version in prod

parent a941f045
......@@ -161,7 +161,9 @@ sap.ui.jsview("conceptmapper.conceptDetailPage", {
icon : "sap-icon://account"
}) ],
content : [ oHeaderPanel, oCommentPanel, oContentPanel ]
content : [ oHeaderPanel,
//oCommentPanel,
oContentPanel ]
});
return oPage;
......
......@@ -379,6 +379,9 @@ sap.ui.controller("conceptmapper.searchPage", {
oData.page = parseInt(sap.ui.getCore().byId('oSearchFielGoToPage').getProperty('value'));
if (oData.page <= 0) {
oData.page = 1;
}
oData.search_string = sap.ui.getCore().byId('searchField').getProperty('value');
......@@ -396,11 +399,31 @@ sap.ui.controller("conceptmapper.searchPage", {
// GET AJAX call on conceptSSSSS
getConceptsAjax(oData, oTable_ref, oRowsNumber);
buttonTextShown = 'Current page : ' + oData.page;
var oModel = sap.ui.getCore().getModel('conceptsModel');
var aPageFound = oModel.getProperty("/page_found");
var aPageShown = oModel.getProperty("/page_shown");
if (aPageFound === 0 || aPageFound === 1) {
sap.ui.getCore().byId('oButtonPrev').setEnabled(false);
sap.ui.getCore().byId('oButtonNext').setEnabled(false);
} else if (aPageShown === 0 && aPageShown + 1 !== aPageFound) {
sap.ui.getCore().byId('oButtonPrev').setEnabled(false);
sap.ui.getCore().byId('oButtonNext').setEnabled(true);
} else if (aPageShown + 1 === aPageFound) {
sap.ui.getCore().byId('oButtonPrev').setEnabled(true);
sap.ui.getCore().byId('oButtonNext').setEnabled(false);
} else {
sap.ui.getCore().byId('oButtonPrev').setEnabled(true);
sap.ui.getCore().byId('oButtonNext').setEnabled(true);
}
buttonTextShown = 'Current page : ' + ++aPageShown;
buttonTextFound = 'Total page(s) : ' + aPageFound;
sap.ui.getCore().byId('oButtonCurrentPage').setText(buttonTextShown);
sap.ui.getCore().byId('oButtonTotalPages').setText(buttonTextFound);
......@@ -837,80 +860,7 @@ sap.ui.controller("conceptmapper.searchPage", {
sap.ui.getCore().byId("__container1-Master").addStyleClass('searchPage');
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "Standard",
"text" : "Standard"
},
{
"key" : "Non-Standard",
"text" : "Non-Standard"
},
{
"key" : "Classification",
"text" : "Classification"
}]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "standardConcept");
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "Deleted",
"text" : "Deleted"
},{
"key" : "Updated",
"text" : "Updated"
},
{
"key" : "Valid",
"text" : "Valid"
}]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "invalidReason");
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "Condition",
"text" : "Condition"
},
{
"key" : "Device",
"text" : "Device"
},
{
"key" : "Cost",
"text" : "Cost"
}]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "domain");
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "SNOMED",
"text" : "SNOMED"
},
{
"key" : "LOINC",
"text" : "LOINC"
},
{
"key" : "PCORNET",
"text" : "PCORNET"
}]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "vocabulary");
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
......@@ -970,6 +920,254 @@ sap.ui.controller("conceptmapper.searchPage", {
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "isValidModel");
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "Condition",
"text" : "Condition"
},{
"key" : "Condition/Device",
"text" : "Condition/Device"
},{
"key" : "Condition/Meas",
"text" : "Condition/Meas"
},{
"key" : "Condition/Procedure",
"text" : "Condition/Procedure"
},{
"key" : "Currencys",
"text" : "Currency"
},{
"key" : "Device",
"text" : "Device"
},{
"key" : "Drug",
"text" : "Drug"
},{
"key" : "Ethnicity",
"text" : "Ethnicity"
},{
"key" : "Gender",
"text" : "Gender"
},{
"key" : "Meas/Procedure",
"text" : "Meas/Procedure"
},{
"key" : "Measurement",
"text" : "Measurement"
},{
"key" : "Meas Value",
"text" : "Meas Value"
},{
"key" : "Meas Value Operator",
"text" : "Meas Value Operator"
},{
"key" : "Metadata",
"text" : "Metadata"
},{
"key" : "Observation",
"text" : "Observation"
},{
"key" : "Place of Service",
"text" : "Place of Service"
},{
"key" : "Procedure",
"text" : "Procedure"
},{
"key" : "Place of Service",
"text" : "Place of Service"
},{
"key" : "Provider Specialty",
"text" : "Provider Specialty"
},{
"key" : "Race",
"text" : "Race"
},{
"key" : "Relationship",
"text" : "Relationship"
},{
"key" : "Revenue Code",
"text" : "Revenue Code"
},{
"key" : "Route",
"text" : "Route"
},{
"key" : "Spec Anatomic Site",
"text" : "Spec Anatomic Site"
},{
"key" : "Spec Disease Status",
"text" : "Spec Disease Status"
},{
"key" : "Specimen",
"text" : "Specimen"
},{
"key" : "Type Concept",
"text" : "Type Concept"
},{
"key" : "Unit",
"text" : "Unit"
},{
"key" : "Visit",
"text" : "Visit"
},
]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "domain");
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "ABMS",
"text" : "ABMS"
},{
"key" : "ATC",
"text" : "ATC"
},{
"key" : "CIM10",
"text" : "CIM10"
},{
"key" : "Concept Class",
"text" : "Concept Class"
},{
"key" : "Condition Type",
"text" : "Condition Type"
},{
"key" : "Cost Type",
"text" : "Cost Type"
},{
"key" : "CPT4",
"text" : "CPT4"
},{
"key" : "Currency",
"text" : "Currency"
},{
"key" : "Death Type",
"text" : "Death Type"
},{
"key" : "Device Type",
"text" : "Device Type"
},{
"key" : "Domain",
"text" : "Domain"
},{
"key" : "DRG",
"text" : "DRG"
},{
"key" : "Drug Type",
"text" : "Drug Type"
},{
"key" : "Ethnicity",
"text" : "Ethnicity"
},{
"key" : "Gender",
"text" : "Gender"
},{
"key" : "HCPCS",
"text" : "HCPCS"
},{
"key" : "ICD10CM",
"text" : "ICD10CM"
},{
"key" : "ICD9CM",
"text" : "ICD9CM"
},{
"key" : "ICD9Proc",
"text" : "ICD9Proc"
},{
"key" : "LOINC",
"text" : "LOINC"
},{
"key" : "Meas Type",
"text" : "Meas Type"
},{
"key" : "NDC",
"text" : "NDC"
},{
"key" : "NDFRT",
"text" : "NDFRT"
},{
"key" : "None",
"text" : "None"
},{
"key" : "Note Type",
"text" : "Note Type"
},{
"key" : "NUCC",
"text" : "NUCC"
},{
"key" : "Observation Type",
"text" : "Observation Type"
},{
"key" : "Obs Period Type",
"text" : "Obs Period Type"
},{
"key" : "Place of Service",
"text" : "Place of Service"
},{
"key" : "Procedure Type",
"text" : "Procedure Type"
},{
"key" : "Race",
"text" : "Race"
},{
"key" : "Relationship",
"text" : "Relationship"
},{
"key" : "Revenue Code",
"text" : "Revenue Code"
},{
"key" : "RxNorm",
"text" : "RxNorm"
},{
"key" : "RxNorm Extension",
"text" : "RxNorm Extension"
},{
"key" : "SNOMED",
"text" : "SNOMED"
},{
"key" : "Specialty",
"text" : "Specialty"
},{
"key" : "Specimen Type",
"text" : "Specimen Type"
},{
"key" : "SPL",
"text" : "SPL"
},{
"key" : "UCUM",
"text" : "UCUM"
},{
"key" : "VA Class",
"text" : "VA Class"
},{
"key" : "Visit",
"text" : "Visit"
},{
"key" : "Visit Type",
"text" : "Visit Type"
},{
"key" : "Vocabulary",
"text" : "Vocabulary"
}]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "vocabulary");
},
......
......@@ -27,39 +27,39 @@ sap.ui.jsview("conceptmapper.searchPage", {
var oItemTemplateStandard = new sap.ui.core.Item({
key : "{standardConcept>key}",
text : "{standardConcept>text}",
enabled : "{standardConcept>enabled}"
key : "{isStandardModel>key}",
text : "{isStandardModel>text}",
enabled : "{isStandardModel>enabled}"
});
var oStandardMCB = new sap.m.MultiComboBox({
id : "oStandardMCB",
// width : "400px",
placeholder : "Standard Concepts",
items : {
path : "standardConcept>/items",
path : "isStandardModel>/items",
template : oItemTemplateStandard
},
selectedKeys : {
path : "standardConcept>/selected",
template : "{standardConcept>selected}"
path : "isStandardModel>/selected",
template : "{isStandardModel>selected}"
},
});
var oItemTemplateValid = new sap.ui.core.Item({
key : "{invalidReason>key}",
text : "{invalidReason>text}",
enabled : "{invalidReason>enabled}"
key : "{isValidModel>key}",
text : "{isValidModel>text}",
enabled : "{isValidModel>enabled}"
});
var oValidMCB = new sap.m.MultiComboBox({
id : "oValidMCB",
placeholder : "Valid concept",
items : {
path : "invalidReason>/items",
path : "isValidModel>/items",
template : oItemTemplateValid
},
selectedKeys : {
path : "invalidReason>/selected",
template : "{invalidReason>selected}"
path : "isValidModel>/selected",
template : "{isValidModel>selected}"
},
});
......@@ -102,12 +102,16 @@ sap.ui.jsview("conceptmapper.searchPage", {
var oMiniIB = new sap.m.Input({
id : "oMiniIB",
value: "Mini id", // to suppress
enabled: false, // to suppress
placeholder : "Mini id",
});
var oMaxiIB = new sap.m.Input({
id : "oMaxiIB",
value: "Maxi id", // to suppress
enabled: false, // to suppress
placeholder : "Maxi id",
});
......@@ -135,8 +139,10 @@ sap.ui.jsview("conceptmapper.searchPage", {
navButtonPress : function(oEvt) {
app.back();
},
content : [ oValidMCB, oStandardMCB, oDomainMCB, oVocMCB, oMiniIB,
oMaxiIB, oLangMCB, ],
content : [ oValidMCB, oStandardMCB, oDomainMCB, oVocMCB,
oMiniIB,
oMaxiIB,
oLangMCB, ],
});
......@@ -167,21 +173,23 @@ sap.ui.jsview("conceptmapper.searchPage", {
var oTable = new sap.ui.table.Table({
id : "oTable",
toolbar : new sap.m.Toolbar({
content : [ new sap.m.Button({
text : "{i18n>create_concept}",
press : [ oController.openCreateDialog, oController ],
}), new sap.m.Button({
text : "{i18n>update_concept}",
press : [ oController.openUpdateDialog, oController ],
}), new sap.m.Button({
text : "{i18n>delete_concept}",
type : "Reject",
press : [ oController.openDeleteDialog, oController ],
}), new sap.m.SearchField({
content : [
// new sap.m.Button({
// text : "{i18n>create_concept}",
// press : [ oController.openCreateDialog, oController ],
// }), new sap.m.Button({
// text : "{i18n>update_concept}",
// press : [ oController.openUpdateDialog, oController ],
// }), new sap.m.Button({
// text : "{i18n>delete_concept}",
// type : "Reject",
// press : [ oController.openDeleteDialog, oController ],
// }),
new sap.m.SearchField({
id: 'searchField',
placeholder : "{i18n>research}",
search : [ oController.searcher, oController ],
}) ]
}).addStyleClass('searchField') ]
}),
visibleRowCount: 15,
cellClick : [ oController.goToConceptDetail, oController ],
......@@ -223,7 +231,7 @@ sap.ui.jsview("conceptmapper.searchPage", {
sortProperty : "concept_code",
editable : false,
width : '12%',
width : '8%',
}));
......@@ -237,7 +245,7 @@ sap.ui.jsview("conceptmapper.searchPage", {
sortProperty : "concept_class_id",
editable : false,
width : '13%',
width : '8%',
}));
......@@ -251,7 +259,7 @@ sap.ui.jsview("conceptmapper.searchPage", {
sortProperty : "vocabulary_id",
editable : false,
width : '13%',
width : '8%',
......@@ -266,7 +274,7 @@ sap.ui.jsview("conceptmapper.searchPage", {
sortProperty : "standard_concept",
editable : false,
width : '7%',
width : '9%',
}));
......@@ -280,7 +288,7 @@ sap.ui.jsview("conceptmapper.searchPage", {
sortProperty : "validity",
editable : false,
width : '7%',
width : '5%',
}));
......@@ -294,40 +302,29 @@ sap.ui.jsview("conceptmapper.searchPage", {
sortProperty : "domain_id",
editable : false,
width : '10%',
width : '7%',
}));
oTable.addColumn(new sap.ui.table.Column({
label : new sap.ui.commons.Label({
text : "Map"
}),
template : new sap.m.Text({
text : "{conceptsModel>is_mapped}"
}),
sortProperty : "lol",
editable : false,
width : '10%',
}));
// var mapping = new sap.ui.model.Sorter("{conceptsModel>/is_mapped}", false, true);
// debugger;
// oTable.addColumn(new sap.ui.table.Column({
// label : new sap.ui.commons.Label({
// text : "Map"
// }),
// template : new sap.m.Text({
// text : "{conceptsModel>is_mapped}"
// }),
// sortProperty : "lol",
// editable : false,
//
// width : '10%',
//
//
// }));