Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Read me updates" #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
.git
node_modules
backend/node_modules
logs
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
README.md
14 changes: 0 additions & 14 deletions .github/auto_assign.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/ForkSync.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/docker-base-ci.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/docker-cd.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/docker-ci.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

node_modules/
backend/node_modules/
logs/

# compiled output
/dist
/tmp
Expand Down
45 changes: 4 additions & 41 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,11 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Pharmacy-Information-System Backend (Docker)",
"port": 3011,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/node/app/pharmacy-information-system",
"restart": true
},
{
"name": "Debug Pharmacy-Information-System Backend (Local)",
"port": 3011,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"restart": true
},
{
"type": "chrome",
"name": "Docker Node.js Launch",
"type": "docker",
"request": "launch",
"name": "Debug Pharmacy-Information-System Frontend (Launch Local + Docker)",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"runtimeArgs": [
"--remote-debugging-port=9222"
]
},
{
"type": "chrome",
"request": "attach", // Launch Chrome According To: https://github.com/microsoft/vscode-chrome-debug#attach
"name": "Debug Pharmacy-Information-System Frontend (Attach Local + Docker)",
"url": "http://localhost:4200/*",
"port": 9222,
"webRoot": "${workspaceFolder}",
"preLaunchTask": "docker-run: debug",
"platform": "node"
}
]
}
39 changes: 39 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "docker-build",
"label": "docker-build",
"platform": "node",
"dockerBuild": {
"dockerfile": "${workspaceFolder}/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": [
"docker-build"
],
"platform": "node"
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": [
"docker-build"
],
"dockerRun": {
"env": {
"DEBUG": "*",
"NODE_ENV": "development"
}
},
"node": {
"enableDebugging": true
}
}
]
}
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM codexrems/node14-pkg-config:REMSvCurrent
WORKDIR /home/node/app/pharmacy-information-system
COPY --chown=node:node . .
RUN npm install
WORKDIR /home/node/app/pharmacy-information-system/backend
RUN npm install
WORKDIR /home/node/app/pharmacy-information-system
EXPOSE 3010
EXPOSE 4200
CMD node backend/populatedb.js && npm run start
FROM node:12.18-alpine
ENV NODE_ENV production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY . .
EXPOSE 8080
CMD npm start
4 changes: 0 additions & 4 deletions Dockerfile.base

This file was deleted.

11 changes: 0 additions & 11 deletions Dockerfile.dev

This file was deleted.

15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Star :star: the repo to help the developers :innocent:

<table>
<tr>
<td>Doctor Orders</td>
<td>Verified Doctor Orders</td>
<td>Doctor Oders</td>
<td>Verified Doctor Oders</td>

</tr>
<tr>
Expand Down Expand Up @@ -109,15 +109,14 @@ Star :star: the repo to help the developers :innocent:
3) cd (change directory) in to the project folder
4) Run `npm install` in your terminal
5) Run `ng serve` to run the Angular frontend
6) Start backend database using docker. Run `docker run --name rems_local_pharmacy-information-system-database --expose 27017 -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME='pharmacy-information-root' -e MONGO_INITDB_ROOT_PASSWORD='pharmacy-information-password' -v rems_local_pharmacy-infomation-system-database:/data/db mongo`
7) Run `npm run start:server` to run the backend Node server
8) Open your browser and navigate to `http://localhost:4200/`
6) Run `npm run start:server` to run the backend Node server
7) Open your browser and navigate to `http://localhost:4200/`


## 🚨 Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
Run `npm run start:serve` for a backend server. Navigate to `http://localhost:3010/`.
Run `npm run start:serve` for a backend server. Navigate to `http://localhost:3000/`.

## 🚨 Code scaffolding

Expand All @@ -134,3 +133,7 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
## 🚨 Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## 🚨 Further help

To get more help on this please email "[email protected]" or feel free to open a issue
25 changes: 12 additions & 13 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,26 @@ const inventoryRoutes = require('./routes/inventory');
const userRoutes = require('./routes/user');
const salesRoutes = require('./routes/sales');
const doctorUserRoutes = require('./routes/doctorUser');
const doctorOrderRoutes = require('./routes/doctorOrders');
// const verifiedDoctorOrderRoutes = require('./routes/verifiedDoctorOrder');
// const pickedUpOrdersRoutes = require('./routes/pickedUpOrders');
const doctorOderRoutes = require('./routes/doctorOders');
const verifiedDoctorOderRoutes = require('./routes/verifiedDoctorOder');
const pickedUpOdersRoutes = require('./routes/pickedUpOders');


const mongoConnString = process.env.MONGODB_CONNSTRING ? process.env.MONGODB_CONNSTRING : 'mongodb://pharmacy-information-root:pharmacy-information-password@localhost:27017?retryWrites=true&w=majority';
mongoose.connect(mongoConnString, {useNewUrlParser: true , useUnifiedTopology: true})

mongoose.connect('mongodb+srv://lalana:[email protected]/pharmacy?retryWrites=true&w=majority',{useNewUrlParser: true , useUnifiedTopology: true})
.then(()=>{
console.log('connected to database!');
})
.catch((e)=>{
console.log(e);
.catch(()=>{
console.log('connection failed! ');
});
});
mongoose.set('useCreateIndex', true);

//OJx2X4IllVNl9up4


app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({ extended: false, limit: '50mb' }));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use("/images" , express.static(path.join("images")));


Expand Down Expand Up @@ -114,8 +113,8 @@ app.use("/api/inventory",inventoryRoutes);
app.use("/api/user",userRoutes);
app.use("/api/sales",salesRoutes);
app.use("/api/doctorUser",doctorUserRoutes);
app.use("/api/doctorOrder",doctorOrderRoutes);
// app.use("/api/verifiedDoctorOrder",verifiedDoctorOrderRoutes);
// app.use("/api/pickedUpOrders",pickedUpOrdersRoutes);
app.use("/api/doctorOder",doctorOderRoutes);
app.use("/api/verifiedDoctorOder",verifiedDoctorOderRoutes);
app.use("/api/pickedUpOders",pickedUpOdersRoutes);

module.exports = app;
14 changes: 3 additions & 11 deletions backend/models/doctorOrders.js → backend/models/doctorOders.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const mongoose = require('mongoose');

const doctorOrderSchema = mongoose.Schema({
patientName: {type: String , require:true},
patientDOB: {type: String , require:true},
const doctorOderSchema = mongoose.Schema({
doctorName: {type: String , require:true},
doctorContact: {type: String , require:true},
doctorID: {type: String , require:true},
Expand All @@ -13,13 +11,7 @@ const doctorOrderSchema = mongoose.Schema({
drugQuantity: {type: Array , require:true},
realQuantity: {type: Array , require:true},
totalAmount : { type: String , require: true},
pickupDate : { type: String , require: true},
actualDate : { type: String , require: true},
dispenseStatus : { type: String , require: true},
caseNumber : { type: String , require: false},
//send full object here
rawFHIRObject : { type: Object, require: false}
pickupDate : { type: String , require: true}
})

module.exports = mongoose.model('DoctorOrder',doctorOrderSchema);

module.exports = mongoose.model('DoctorOder',doctorOderSchema);
Loading