Errors generated:
1st. 2 instances of:
Unhandled rejection TypeError: Cannot read property '0' of null
at sequelize.define.typesOfMachinesAvailable.set (/home/ubuntu/diaware2/diaware/app/models/centres.js:60:23)
at Instance.set (/home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance.js:311:32)
at Instance.set (/home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance.js:293:16)
at Instance.update (/home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance.js:821:8)
at . (/home/ubuntu/diaware2/diaware/app/routes/centreroute.js:213:23)
at tryCatcher (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues as _onImmediate
at tryOnImmediate (timers.js:543:15)
at processImmediate as _immediateCallback
2nd . 3 instances of:
Unhandled rejection TypeError: Cannot read property 'id' of null
at . (/home/ubuntu/diaware2/diaware/app/routes/centreroute.js:212:22)
at tryCatcher (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues as _onImmediate
at tryOnImmediate (timers.js:543:15)
at processImmediate as _immediateCallback
3rd . 3 instances of:
Unhandled rejection SequelizeValidationError: Validation error: Validation isIn failed
at /home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance-validator.js:74:14
at tryCatcher (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18)
at Promise._fulfill (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:630:18)
at PromiseArray._resolve (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise_array.js:125:19)
at PromiseArray._promiseFulfilled (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise_array.js:143:14)
at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:566:26)
at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18)
at Promise._fulfill (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:630:18)
at Promise._resolveCallback (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:425:57)
at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:516:17)
at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18)
There were 5 insert queries for patientDetails: 1. Executing (default): INSERT INTO
patientDetails
(id
,name
,age
,DOB
,gender
,type
,contact
,alternativeContact
,location
,address
,bloodGroup
,transplantWaitingList
,maritalStatus
,emergencyContactName
,emergencyContactRelationship
,emergencyContactMobile
,hasChildren
,numberOfChildren
,childrenContact
,employementStatus
,officeName
,officeAddress
,otherClinicalDetails
,modeOfPayment
,referredBy
,doctorName
,viralMarkerStatus
,lastModifiedBy
,createdAt
,updatedAt
,centreId
) VALUES ('JP1-2016-4','test-user2',19,'1997-01-08 18:30:00','Male','Negative','9999102942',9990929729,'hello','aads','A+','Yes','married',NULL,NULL,NULL,'Yes',1,'9787429272','salaried','l&T infotech','bhopal','','Cash','ref-1','Dr. lal','Yes','admin','2016-09-09 12:08:35','2016-09-09 12:08:35','JP1');2. Executing (default): INSERT INTO
patientDetails
(id
,name
,age
,DOB
,gender
,type
,contact
,alternativeContact
,location
,address
,bloodGroup
,transplantWaitingList
,maritalStatus
,emergencyContactName
,emergencyContactRelationship
,emergencyContactMobile
,hasChildren
,numberOfChildren
,childrenContact
,employementStatus
,officeName
,officeAddress
,otherClinicalDetails
,modeOfPayment
,referredBy
,doctorName
,viralMarkerStatus
,lastModifiedBy
,createdAt
,updatedAt
,centreId
) VALUES ('7Med Varanasi-2016-1','test-user1',20,'1996-07-02 18:30:00','Male','Negative','9999102942',9900395732,'jaipur','sector-2','A+','Yes','married',NULL,NULL,NULL,'Yes',1,'8974982728','salaried','l&T infotech','jaiput',NULL,'Cash','ajay','vikas','Yes','admin','2016-09-09 12:21:47','2016-09-09 12:21:47','7Med Varanasi');3. Executing (default): INSERT INTO
patientDetails
(id
,name
,age
,DOB
,gender
,type
,contact
,alternativeContact
,location
,address
,bloodGroup
,transplantWaitingList
,maritalStatus
,emergencyContactName
,emergencyContactRelationship
,emergencyContactMobile
,hasChildren
,numberOfChildren
,childrenContact
,employementStatus
,officeName
,officeAddress
,otherClinicalDetails
,modeOfPayment
,referredBy
,doctorName
,viralMarkerStatus
,lastModifiedBy
,createdAt
,updatedAt
,centreId
) VALUES ('7Med Banaras-2016-1','test-user2',22,'1994-06-08 18:30:00','Male','Negative','9999102942',9798798247,'jaipur','hell','A+','Yes','married',NULL,NULL,NULL,'Yes',2,NULL,NULL,NULL,NULL,NULL,'Cash','doc','Dr. lal','Yes','admin','2016-09-09 12:24:05','2016-09-09 12:24:05','7Med Banaras');4. Executing (default): INSERT INTO
patientDetails
(id
,name
,age
,DOB
,gender
,type
,contact
,alternativeContact
,location
,address
,bloodGroup
,transplantWaitingList
,maritalStatus
,emergencyContactName
,emergencyContactRelationship
,emergencyContactMobile
,numberOfChildren
,childrenContact
,employementStatus
,officeName
,officeAddress
,otherClinicalDetails
,modeOfPayment
,doctorName
,viralMarkerStatus
,lastModifiedBy
,createdAt
,updatedAt
,centreId
) VALUES ('7Med Banaras-2016-2','test-user1',20,'1996-08-31 18:30:00','Male','Negative','9999102942',NULL,'jaipur','jaiput','A+','Yes',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,'Cash','vikas','Yes','admin','2016-09-09 12:25:18','2016-09-09 12:25:18','7Med Banaras');5. Executing (default): INSERT INTO
patientDetails
(id
,name
,age
,DOB
,gender
,type
,contact
,alternativeContact
,location
,address
,bloodGroup
,transplantWaitingList
,maritalStatus
,emergencyContactName
,emergencyContactRelationship
,emergencyContactMobile
,hasChildren
,numberOfChildren
,childrenContact
,employementStatus
,officeName
,officeAddress
,otherClinicalDetails
,modeOfPayment
,referredBy
,doctorName
,viralMarkerStatus
,lastModifiedBy
,createdAt
,updatedAt
,centreId
) VALUES ('7Med Banaras-2016-3','Raj',66,'1950-08-31 18:30:00','Male','Negative','9999999999',NULL,'Banaras','Banaras','A+','No','married','Vivek','Friend','9898989898','No',0,NULL,NULL,NULL,NULL,NULL,'Cash','Referred By','Ajay','Yes','admin','2016-09-09 14:07:47','2016-09-09 14:07:47','7Med Banaras');Errors generated: 1st. 2 instances of: Unhandled rejection TypeError: Cannot read property '0' of null at sequelize.define.typesOfMachinesAvailable.set (/home/ubuntu/diaware2/diaware/app/models/centres.js:60:23) at Instance.set (/home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance.js:311:32) at Instance.set (/home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance.js:293:16) at Instance.update (/home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance.js:821:8) at . (/home/ubuntu/diaware2/diaware/app/routes/centreroute.js:213:23)
at tryCatcher (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues as _onImmediate
at tryOnImmediate (timers.js:543:15)
at processImmediate as _immediateCallback
2nd . 3 instances of: Unhandled rejection TypeError: Cannot read property 'id' of null at . (/home/ubuntu/diaware2/diaware/app/routes/centreroute.js:212:22)
at tryCatcher (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues as _onImmediate
at tryOnImmediate (timers.js:543:15)
at processImmediate as _immediateCallback
3rd . 3 instances of: Unhandled rejection SequelizeValidationError: Validation error: Validation isIn failed at /home/ubuntu/diaware2/diaware/node_modules/sequelize/lib/instance-validator.js:74:14 at tryCatcher (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:504:31) at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18) at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10) at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18) at Promise._fulfill (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:630:18) at PromiseArray._resolve (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise_array.js:125:19) at PromiseArray._promiseFulfilled (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise_array.js:143:14) at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:566:26) at Promise._settlePromise0 (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:606:10) at Promise._settlePromises (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:685:18) at Promise._fulfill (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:630:18) at Promise._resolveCallback (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:425:57) at Promise._settlePromiseFromHandler (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:516:17) at Promise._settlePromise (/home/ubuntu/diaware2/diaware/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:561:18)
Final state in database:
mysql> select * from patientDetails; +----------------------+------------+------+---------------------+--------+----------+------------+--------------------+----------+----------+------------+-----------------------+---------------+----------------------+------------------------------+------------------------+-------------+------------------+-----------------+-------------------+--------------+---------------+----------------------+---------------+-------------+------------+-------------------+----------------+---------------------+---------------------+---------------+ | id | name | age | DOB | gender | type | contact | alternativeContact | location | address | bloodGroup | transplantWaitingList | maritalStatus | emergencyContactName | emergencyContactRelationship | emergencyContactMobile | hasChildren | numberOfChildren | childrenContact | employementStatus | officeName | officeAddress | otherClinicalDetails | modeOfPayment | referredBy | doctorName | viralMarkerStatus | lastModifiedBy | createdAt | updatedAt | centreId | +----------------------+------------+------+---------------------+--------+----------+------------+--------------------+----------+----------+------------+-----------------------+---------------+----------------------+------------------------------+------------------------+-------------+------------------+-----------------+-------------------+--------------+---------------+----------------------+---------------+-------------+------------+-------------------+----------------+---------------------+---------------------+---------------+ | 7Med Banaras-2016-1 | test-user2 | 22 | 1994-06-08 18:30:00 | Male | Negative | 9999102942 | 9798798247 | jaipur | hell | A+ | Yes | married | NULL | NULL | NULL | Yes | 2 | NULL | NULL | NULL | NULL | NULL | Cash | doc | Dr. lal | Yes | admin | 2016-09-09 12:24:05 | 2016-09-09 12:24:05 | 7Med Banaras | | 7Med Banaras-2016-2 | test-user1 | 20 | 1996-08-31 18:30:00 | Male | Negative | 9999102942 | NULL | jaipur | jaiput | A+ | Yes | NULL | NULL | NULL | NULL | NULL | 0 | NULL | NULL | NULL | NULL | NULL | Cash | NULL | vikas | Yes | admin | 2016-09-09 12:25:18 | 2016-09-09 12:25:18 | 7Med Banaras | | 7Med Banaras-2016-3 | Raj | 66 | 1950-08-31 18:30:00 | Male | Negative | 9999999999 | NULL | Banaras | Banaras | A+ | No | married | Vivek | Friend | 9898989898 | No | 0 | NULL | NULL | NULL | NULL | NULL | Cash | Referred By | Ajay | Yes | admin | 2016-09-09 14:07:47 | 2016-09-09 14:07:47 | 7Med Banaras | | 7Med Varanasi-2016-1 | test-user1 | 20 | 1996-07-02 18:30:00 | Male | Negative | 9999102942 | 9900395732 | jaipur | sector-2 | A+ | Yes | married | NULL | NULL | NULL | Yes | 1 | 8974982728 | salaried | l&T infotech | jaiput | NULL | Cash | ajay | vikas | Yes | admin | 2016-09-09 12:21:47 | 2016-09-09 12:21:47 | 7Med Varanasi | | JP1-2016-3 | Test User | 20 | 1996-09-01 18:30:00 | Male | Negative | NULL | NULL | jaipur | home | A+ | Yes | NULL | NULL | NULL | NULL | NULL | 0 | NULL | NULL | NULL | NULL | NULL | Cash | NULL | doc name | Yes | admin | 2016-09-05 14:18:05 | 2016-09-05 14:18:05 | JP1 | | JP1-2016-4 | test-user2 | 19 | 1997-01-08 18:30:00 | Male | Negative | 9999102942 | 9990929729 | hello | aads | A+ | Yes | married | NULL | NULL | NULL | Yes | 1 | 9787429272 | salaried | l&T infotech | bhopal | | Cash | ref-1 | Dr. lal | Yes | admin | 2016-09-09 12:08:35 | 2016-09-09 12:08:35 | JP1 | +----------------------+------------+------+---------------------+--------+----------+------------+--------------------+----------+----------+------------+-----------------------+---------------+----------------------+------------------------------+------------------------+-------------+------------------+-----------------+-------------------+--------------+---------------+----------------------+---------------+-------------+------------+-------------------+----------------+---------------------+---------------------+---------------+