Ejemplo n.º 1
0
 public AdminConceptDTO(AdminConcept c)
 {
     Id                           = c.Id;
     UniversalId                  = c.UniversalId?.ToString();
     ParentId                     = c.ParentId;
     RootId                       = c.RootId;
     ExternalId                   = c.ExternalId;
     ExternalParentId             = c.ExternalParentId;
     SqlSetId                     = c.SqlSetId;
     IsNumeric                    = c.IsNumeric;
     IsParent                     = c.IsParent;
     IsRoot                       = c.IsRoot;
     IsPatientCountAutoCalculated = c.IsPatientCountAutoCalculated;
     IsSpecializable              = c.IsSpecializable;
     SqlSetWhere                  = c.SqlSetWhere;
     SqlFieldNumeric              = c.SqlFieldNumeric;
     UiDisplayName                = c.UiDisplayName;
     UiDisplayText                = c.UiDisplayText;
     UiDisplaySubtext             = c.UiDisplaySubtext;
     UiDisplayUnits               = c.UiDisplayUnits;
     UiDisplayTooltip             = c.UiDisplayTooltip;
     UiDisplayPatientCount        = c.UiDisplayPatientCount;
     UiDisplayPatientCountByYear  = c.UiDisplayPatientCountByYear;
     UiNumericDefaultText         = c.UiNumericDefaultText;
     Constraints                  = c.Constraints;
     SpecializationGroups         = c.SpecializationGroups;
 }
Ejemplo n.º 2
0
        public async Task <AdminConcept> UpdateAsync(AdminConcept c)
        {
            using (var cn = new SqlConnection(opts.ConnectionString))
            {
                await cn.OpenAsync();

                var grid = await cn.QueryMultipleAsync(
                    Sql.Update,
                    new
                {
                    id                           = c.Id,
                    universalId                  = c.UniversalId?.ToString(),
                    parentId                     = c.ParentId,
                    rootId                       = c.RootId,
                    externalId                   = c.ExternalId,
                    externalParentId             = c.ExternalParentId,
                    isPatientCountAutoCalculated = c.IsPatientCountAutoCalculated,
                    isNumeric                    = c.IsNumeric,
                    isParent                     = c.IsParent,
                    isRoot                       = c.IsRoot,
                    isSpecializable              = c.IsSpecializable,
                    sqlSetId                     = c.SqlSetId,
                    sqlSetWhere                  = c.SqlSetWhere,
                    sqlFieldNumeric              = c.SqlFieldNumeric,
                    uiDisplayName                = c.UiDisplayName,
                    uiDisplayText                = c.UiDisplayText,
                    uiDisplaySubtext             = c.UiDisplaySubtext,
                    uiDisplayUnits               = c.UiDisplayUnits,
                    uiDisplayTooltip             = c.UiDisplayTooltip,
                    uiDisplayPatientCount        = c.UiDisplayPatientCount,
                    uiNumericDefaultText         = c.UiNumericDefaultText,
                    constraints                  = ResourceConstraintTable.From(c),
                    specializationGroups         = ConceptSpecializationGroupTable.From(c),
                    user                         = user.UUID
                },
                    commandType : CommandType.StoredProcedure,
                    commandTimeout : opts.DefaultTimeout
                    );

                return(AdminConceptReader.Read(grid));
            }
        }
Ejemplo n.º 3
0
 public static DataTable From(AdminConcept concept)
 {
     return(From(concept.Id, concept.SpecializationGroups));
 }