Skip to content

Commit ce70e98

Browse files
committed
Merge #117 into alpha
2 parents 32846c7 + 6d91055 commit ce70e98

File tree

53 files changed

+2055
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2055
-87
lines changed

backend/config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (isProduction)
66

77
const config = {
88
graphdb: {
9-
addr: isProduction ? 'http://localhost:7200' : `http://${isDocker ? 'host.docker.internal' : 'localhost'}:7200`,
9+
addr: isProduction ? 'http://127.0.0.1:7200' : `http://${isDocker ? 'host.docker.internal' : '127.0.0.1'}:7200`,
1010
repositoryName: process.env.GRAPHDB_REPO || (process.env.test ? "snmiTest" : "snmi")
1111
},
1212
mongodb: {

backend/loaders/express.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ app.use('/api', partnerOrganizationRoute);
9595
await initOptions('Appointment Statuses',
9696
["Requested", "Confirmed", "Cancelled", "Fulfilled", "Client No Show", "Postponed"],
9797
'AppointmentStatus', 'appointmentStatus');
98+
await initOptions('Service and Program Registration Statuses',
99+
["Registered", "Not Registered", "Waitlisted"],
100+
'RegistrationStatus', 'registrationStatus');
98101
})()
99102

100103

backend/models/program/programOccurrence.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const GDBProgramOccurrenceModel = createGraphDBModel({
1515
needSatisfiers: {type: [GDBNeedSatisfierModel], internalKey: ':hasNeedSatisfier'},
1616
// needSatisfierOccurrence: {type: [GDBNeedSatisfierOccurrenceModel], internalKey: ':hasNeedSatisfierOccurrence', onDelete: DeleteType.CASCADE},
1717
description: {type: String, internalKey: 'cids:hasDescription'},
18+
capacity: {type: Number, internalKey: ':hasCapacity'},
19+
occupancy: {type: Number, internalKey: ':hasOccupancy'},
1820
characteristicOccurrences: {type: [GDBCOModel], internalKey: ':hasCharacteristicOccurrence'}
1921
}, {
2022
rdfTypes: [':ProgramOccurrence'], name: 'programOccurrence'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const {createGraphDBModel, DeleteType, Types} = require("graphdb-utils");
2+
3+
//These might need tweaking, need to figure out what things we need for this model
4+
const {GDBProgramOccurrenceModel} = require("./programOccurrence");
5+
const {GDBProgramWaitlistEntryModel} = require("./programWaitlistEntry");
6+
7+
const GDBProgramWaitlistModel = createGraphDBModel({
8+
waitlist: {type: [GDBProgramWaitlistEntryModel], internalKey: ':hasWaitlist'},
9+
programOccurrence: {type: GDBProgramOccurrenceModel, internalKey: ':hasProgramOccurrence'},
10+
},
11+
{
12+
rdfTypes: [':ProgramWaitlist'], name: 'programWaitlist'
13+
}
14+
15+
);
16+
module.exports = {
17+
GDBProgramWaitlistModel
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const {createGraphDBModel, DeleteType, Types} = require("graphdb-utils");
2+
const {GDBProgramRegistrationModel} = require("../programRegistration");
3+
4+
const GDBProgramWaitlistEntryModel = createGraphDBModel({
5+
programRegistration: {type: GDBProgramRegistrationModel, internalKey: ':hasProgramRegistration'},
6+
priority: {type: Number, internalKey: ':hasPriority'},
7+
date: {type: Date, internalKey: ':hasDate'},
8+
},
9+
{
10+
rdfTypes: [':ProgramWaitlistEntry'], name: 'programWaitlistEntry'
11+
}
12+
13+
);
14+
module.exports = {
15+
GDBProgramWaitlistEntryModel
16+
}

backend/models/programRegistration.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {createGraphDBModel, DeleteType, Types, getGraphDBModel} = require("graphdb-utils");
1+
const {createGraphDBModel, DeleteType, Types} = require("graphdb-utils");
22
const {GDBProgramOccurrenceModel} = require("./program/programOccurrence");
33
const {GDBClientModel} = require("./ClientFunctionalities/client");
44
const {GDBReferralModel} = require("./referral");
@@ -13,6 +13,7 @@ const GDBProgramRegistrationModel = createGraphDBModel({
1313
client: {type: GDBClientModel, internalKey: ':hasClient'},
1414
referral: {type: GDBReferralModel, internalKey: ':hasReferral'},
1515
appointment: {type: GDBAppointmentModel, internalKey: ':hasAppointment'},
16+
status: {type: String, internalKey: ':hasRegistrationStatus'},
1617
characteristicOccurrences: {type: [GDBCOModel], internalKey: ':hasCharacteristicOccurrence'},
1718
address: {type: GDBAddressModel, internalKey: 'ic:hasAddress', onDelete: DeleteType.CASCADE},
1819
}, {

backend/models/service/serviceOccurrence.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const GDBServiceOccurrenceModel = createGraphDBModel({
1515
needSatisfiers: {type: [GDBNeedSatisfierModel], internalKey: ':hasNeedSatisfier'},
1616
// needSatisfierOccurrence: {type: [GDBNeedSatisfierOccurrenceModel], internalKey: ':hasNeedSatisfierOccurrence', onDelete: DeleteType.CASCADE},
1717
description: {type: String, internalKey: 'cids:hasDescription'},
18+
capacity: {type: Number, internalKey: ':hasCapacity'},
19+
occupancy: {type: Number, internalKey: ':hasOccupancy'},
1820
characteristicOccurrences: {type: [GDBCOModel], internalKey: ':hasCharacteristicOccurrence'}
1921
}, {
2022
rdfTypes: [':ServiceOccurrence'], name: 'serviceOccurrence'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const {createGraphDBModel, DeleteType, Types} = require("graphdb-utils");
2+
3+
//These might need tweaking, need to figure out what things we need for this model
4+
const {GDBServiceOccurrenceModel} = require("./serviceOccurrence");
5+
const {GDBServiceWaitlistEntryModel} = require("./serviceWaitlistEntry");
6+
7+
const GDBServiceWaitlistModel = createGraphDBModel({
8+
waitlist: {type: [GDBServiceWaitlistEntryModel], internalKey: ':hasWaitlist'},
9+
serviceOccurrence: {type: GDBServiceOccurrenceModel, internalKey: ':hasServiceOccurrence'},
10+
},
11+
{
12+
rdfTypes: [':ServiceWaitlist'], name: 'serviceWaitlist'
13+
}
14+
15+
);
16+
module.exports = {
17+
GDBServiceWaitlistModel
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const {createGraphDBModel, DeleteType, Types} = require("graphdb-utils");
2+
const { GDBServiceRegistrationModel } = require("../serviceRegistration");
3+
4+
const GDBServiceWaitlistEntryModel = createGraphDBModel({
5+
serviceRegistration: {type: GDBServiceRegistrationModel, internalKey: ':hasServiceRegistration'},
6+
priority: {type: Number, internalKey: ':hasPriority'},
7+
date: {type: Date, internalKey: ':hasDate'},
8+
},
9+
{
10+
rdfTypes: [':ServiceWaitlistEntry'], name: 'serviceWaitlistEntry'
11+
}
12+
);
13+
14+
module.exports = {
15+
GDBServiceWaitlistEntryModel
16+
}

backend/models/serviceRegistration.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const GDBServiceRegistrationModel = createGraphDBModel({
1313
client: {type: GDBClientModel, internalKey: ':hasClient'},
1414
referral: {type: GDBReferralModel, internalKey: ':hasReferral'},
1515
appointment: {type: GDBAppointmentModel, internalKey: ':hasAppointment'},
16+
status: {type: String, internalKey: ':hasRegistrationStatus'},
1617
characteristicOccurrences: {type: [GDBCOModel], internalKey: ':hasCharacteristicOccurrence'},
1718
address: {type: GDBAddressModel, internalKey: 'ic:hasAddress', onDelete: DeleteType.CASCADE},
1819
}, {

0 commit comments

Comments
 (0)