Skip to content

Instantly share code, notes, and snippets.

View marianoqueirel's full-sized avatar
🏠
Working from home

Mariano Queirel marianoqueirel

🏠
Working from home
View GitHub Profile
'use strict';
// Afiliados controller
angular.module('afiliados').controller('AfiliadosController', ['$scope', '$stateParams', '$location', 'Authentication', 'fileReader', 'Afiliados',
function($scope, $stateParams, $location, Authentication, fileReader, Afiliados) {
$scope.authentication = Authentication;
$scope.forma_ingreso = {
forma: 'Titular'
};
$scope.photo = '1';
<script type="text/javascript">
function init()
{
if(navigator.webkitGetUserMedia)
{
navigator.webkitGetUserMedia({video:true}, onSuccess, onFail);
}
else
{
alert('webRTC not available');
'use strict';
angular.module('afiliados').controller('WebcamController', ['$scope',
function($scope) {
var _video = null,
patData = null;
// VIDEO
$scope.patOpts = {x: 0, y: 0, w: 25, h: 25};
$scope.webcamError = false;
$scope.onError = function (err) {
#!/usr/bin/env bash
wget "https://code.jquery.com/jquery-2.2.0.min.js"
mkdir client/assets/jquery-2.2.0
mv jquery-2.2.0.min.js client/assets/jquery-2.2.0
echo 'Done!'
/**
* CRITL | Exposure to substance is unlikely to result in a life threatening or organ system threatening outcome.
* | Future exposure to the Substance is considered a relative contra-indication.
*--------+----------------------------------------------------------------------------------------------------------
* CRITH | Exposure to substance may result in a life threatening or organ system threatening outcome.
* | Future exposure to the Substance may be considered an absolute contra-indication.
*--------+----------------------------------------------------------------------------------------------------------
* CRITU | Unable to assess the potential clinical impact with the information available.
*/
save(form) {
if (form.$valid) {
this.isLoading = true;
const model = angular.copy(this.model);
const patient = this.patientFactory.createPatient(model);
this.patientSvc.save(patient)
.then(() => {
{
"errors": {
"birthDate": {
"message": "The birthDate is invalid",
"name": "ValidatorError",
"properties": {
"type": "user defined",
"message": "The birthDate is invalid",
"path": "birthDate",
"value": "2020-07-02T03:00:00.000Z"
{
"errors": {
"dni": {
"message": "Path `dni` is required.",
"name": "ValidatorError",
"properties": {
"type": "required",
"message": "Path `{PATH}` is required.",
"path": "dni"
},
{
"code": 11000,
"index": 0,
"errmsg": "E11000 duplicate key error collection: sisa-dev.patients index: name_1_dni_1_birthDate_1 dup key: { : { given: \"'Mariano'\", family: \"Queirel\" }, : \"32507217\", : new Date(520657200000) }",
"op": {
"name": {
"given": "'Mariano'",
"family": "Queirel"
},
"gender": "male",
{ WriteError({"code":11000,"index":0,"errmsg":"E11000 duplicate key error collection: sisa-dev.patients index: name_1_dni_1_birthDate_1 dup key: { : { given: \"Mariano\", family: \"Queirel\" }, : \"32507217\", : new Date(520657200000) }","op":{"name":{"given":"Mariano","family":"Queirel"},"gender":"male","dni":"32507217","birthDate":"1986-07-02T03:00:00.000Z","deceasedBoolean":false,"address":{"street":"asdas","number":"1231"},"province":"Corrientes","city":"Corrientes","_id":"58935e3c8eae662b70df9beb","active":true,"joined":"2017-02-02T16:28:44.571Z","familyHistory":{"cancer":[]},"history":{"pathologies":{"others":[],"cancer":[]},"procedures":[]},"lifestyle":{"drugs":[]},"contact":[],"telecom":[],"__v":0}})
at Function.MongoError.create (/home/mariano/Projects/sisa/node_modules/mongoose/node_modules/mongodb-core/lib/error.js:31:11)
at toError (/home/mariano/Projects/sisa/node_modules/mongoose/node_modules/mongodb/lib/utils.js:114:22)
at /home/mariano/Projects/sisa/node_modules/mongoose/node_modul