Skip to content

Commit

Permalink
Added the ability to specify the config as a query parameter, Created…
Browse files Browse the repository at this point in the history
… an example
  • Loading branch information
Brem committed Feb 10, 2025
1 parent 0467cf3 commit a9ba1ce
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 2 deletions.
75 changes: 75 additions & 0 deletions v4/pedigree/config/ibmfs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"style": "compact",
"show_id": true,
"display_id_size": 12,
"max_chars": 40,
"show_full_name": true,
"show_initials": false,
"show_first_name": false,
"show_last_name": false,
"show_last_initial": false,
"show_dates" : true,
"show_diseases" : true,
"show_age_of_diagnosis" : true,
"show_procedures" : true,
"show_age_of_procedure" : true,
"allow_move": true,
"allow_edit": false,
"disease_count" : 3,
"procedure_count" : 3,
"quadrant1" : ["D649", "E042"],
"quadrant2" : ["80703"],
"quadrant4" : ["J984"],
"key_diseases" : [
{
"code": "D649",
"shorthand": "Anemia",
"name": "Anemia, Unspecified",
"color": "red"
},
{
"code": "E041",
"shorthand": "TN/CN",
"name": "Thyroid nodule/Cyst nontoxic",
"color": "red"
},
{
"code": "E042",
"shorthand": "NMG",
"name": "Nontoxic multinodular goiter",
"color": "#F88"
},
{
"code": "80703",
"shorthand": "SCC",
"name": "Squamous cell carcinoma, NOS",
"color": "#F88"
},
{
"code": "J984",
"shorthand": "CL",
"name": "Cyst lung",
"color": "#8F8"
}
],
"key_procedures" : [
{
"code": "0639",
"shorthand": "Thyroidectomy",
"name": "Thyroidectomy-partial or subtotal",
"color": "#DDD"
},
{
"code": "8741",
"shorthand": "CT Scan",
"name": "CT Scan Chest"
},
{
"code": "0611",
"shorthand": "Biopsy",
"name": "Biopsy Thyroid",
"color": "#DDD"
}
]

}
13 changes: 11 additions & 2 deletions v4/pedigree/test_pedigree.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ var config = {};
$(document).ready(function() {
// Functions from the top NAVBAR Buttons

$.getJSON('./pedigree/config.json', function(d) {
// First check to see if there is a querystring to provide a config file, if so use it, it not use config.json
var queryString = getUrlVars();
console.log(queryString["config"]);

var configfile = './pedigree/config.json';
if (queryString["config"]) {
configfile = "./pedigree/config/" + queryString["config"] + ".json";
}

$.getJSON(configfile, function(d) {
config = d
console.log(config);
start_pedigree();
Expand Down Expand Up @@ -148,7 +157,7 @@ function update_config_from_querystring (queryString) {
} else {
quadrant4 = config.quadrant4;
}

console.log(style);
$(".fhh_pedigree").pedigree("set_quadrants", quadrant1, quadrant2, quadrant3, quadrant4);

Expand Down

0 comments on commit a9ba1ce

Please sign in to comment.