Ejemplo n.º 1
0
        public PatientDirection(string code, AnatomicalOrientationType anatomicalOrientationType)
        {
            PatientDirection[] components;
            if (anatomicalOrientationType == AnatomicalOrientationType.Quadruped)
            {
                components = ParseQuadrupedDirection(code);
            }
            else
            {
                anatomicalOrientationType = AnatomicalOrientationType.Biped;                 // assume orientation type is BIPED
                components = ParseBipedDirection(code);
            }

            // set the parsed components
            _primaryComponent   = components.Length > 0 ? components[0] : null;
            _secondaryComponent = components.Length > 1 ? components[1] : null;
            _tertiaryComponent  = components.Length > 2 ? components[2] : null;

            _isValid        = components.Length > 0;
            _code           = code ?? string.Empty;
            _description    = string.Join(SR.LabelPatientDirectionSeparator, CollectionUtils.Map <PatientDirection, string>(components, d => d.Description).ToArray());
            _componentCount = components.Length;

            // consider orientation type to be NONE if direction is empty or unspecified (and not just empty because of parse error)
            _anatomicalOrientationType = string.IsNullOrEmpty(code) || Primary.IsUnspecified ? AnatomicalOrientationType.None : anatomicalOrientationType;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a standard component direction.
 /// </summary>
 private PatientDirection(string code, string description, AnatomicalOrientationType anatomicalOrientationType)
 {
     _primaryComponent   = this;
     _secondaryComponent = null;
     _tertiaryComponent  = null;
     _isValid            = true;
     _code                      = code;
     _description               = description;
     _componentCount            = 1;
     _anatomicalOrientationType = anatomicalOrientationType;
 }
Ejemplo n.º 3
0
 public PatientDirection(PatientDirection patientDirection)
     : this(patientDirection.Code, patientDirection.AnatomicalOrientationType)
 {
 }
 public PatientOrientation(PatientDirection row, PatientDirection column)
 {
     Row    = new PatientDirection(row);
     Column = new PatientDirection(column);
 }