Skip to content

Commit

Permalink
added endpoints to assign a case and pull case managers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald-pro committed Jan 10, 2024
1 parent 7ef9fa6 commit 75e6045
Show file tree
Hide file tree
Showing 7 changed files with 12,571 additions and 473 deletions.
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ const pmtct = require("./routes/processes/process_pmtct");
const editApps = require("./routes/processes/edit_appointment");
const terms = require("./routes/terms");
const conf = require("./routes/configs");
const provider = require("./routes/users");
const cases = require("./routes/processes/case");
// app.use(express.json());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true
}));


//verify upi
//verify upi
app.use('/mohupi',verifyupi);
//verify upi
//verify upi
app.use('/appnt',calendarupi);

//PMTCT Module
Expand Down Expand Up @@ -74,6 +76,10 @@ app.use("/api/edit_appointment", editApps)
app.use("/terms", terms)
//configs
app.use("/config", conf)
//pull case managers
app.use("/user", provider)
// assign cases
app.use("/case", cases)


const PORT = process.env.PORT || 3000;
Expand Down
32 changes: 32 additions & 0 deletions models/case_assign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const sequelize = require("../db_config");
const Sequelize = require("sequelize");

const caseAssign = sequelize.sequelize.define(
"tbl_case_assign",
{
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
client_id: Sequelize.INTEGER,
other_reason: Sequelize.TEXT,
reason_assign: {
type: Sequelize.TEXT,
allowNull: true
},
provider_id: Sequelize.INTEGER,
relationship: Sequelize.TEXT,
start_date: Sequelize.DATEONLY,
end_date: Sequelize.DATEONLY,
created_by: Sequelize.INTEGER
},
{
timestamps: true,
paranoid: true,
underscored: true,
freezeTableName: true,
tableName: "tbl_case_assign"
}
);
exports.caseAssign = caseAssign;
Loading

0 comments on commit 75e6045

Please sign in to comment.