github.com/Bio-core/jtree@v0.0.0-20190705165106-1d7a7e7d6272/models/patient.go (about)

     1  package models
     2  
     3  // This file was generated by the swagger tool.
     4  // Editing this file might prove futile when you re-run the swagger generate command
     5  
     6  import (
     7  	"time"
     8  
     9  	strfmt "github.com/go-openapi/strfmt"
    10  
    11  	"github.com/go-openapi/errors"
    12  	"github.com/go-openapi/swag"
    13  )
    14  
    15  // Patient patient
    16  // swagger:model Patient
    17  type Patient struct {
    18  
    19  	// clinical history
    20  	ClinicalHistory *string `json:"patients.clinical_history,omitempty" db:"patients.clinical_history"`
    21  
    22  	// date received
    23  	DateReceived *time.Time `json:"patients.date_received,omitempty" db:"patients.date_received"`
    24  
    25  	// date reported
    26  	DateReported *time.Time `json:"patients.date_reported,omitempty" db:"patients.date_reported"`
    27  
    28  	// dob
    29  	Dob *time.Time `json:"patients.dob,omitempty" db:"patients.dob"`
    30  
    31  	// first name
    32  	FirstName *string `json:"patients.first_name,omitempty" db:"patients.first_name"`
    33  
    34  	// gender
    35  	Gender *string `json:"patients.gender,omitempty" db:"patients.gender"`
    36  
    37  	// initials
    38  	Initials *string `json:"patients.initials,omitempty" db:"patients.initials"`
    39  
    40  	// last name
    41  	LastName *string `json:"patients.last_name,omitempty" db:"patients.last_name"`
    42  
    43  	// mrn
    44  	Mrn *string `json:"patients.mrn,omitempty" db:"patients.mrn"`
    45  
    46  	// on hcn
    47  	OnHcn *string `json:"patients.on_hcn,omitempty" db:"patients.on_hcn"`
    48  
    49  	// patient id
    50  	PatientID *string `json:"patients.patient_id,omitempty" db:"patients.patient_id"`
    51  
    52  	// patient type
    53  	PatientType *string `json:"patients.patient_type,omitempty" db:"patients.patient_type"`
    54  
    55  	// referring physican
    56  	ReferringPhysican *string `json:"patients.referring_physican,omitempty" db:"patients.referring_physican"`
    57  
    58  	// se num
    59  	SeNum *string `json:"patients.se_num,omitempty" db:"patients.se_num"`
    60  
    61  	// surgical date
    62  	SurgicalDate *time.Time `json:"patients.surgical_date,omitempty" db:"patients.surgical_date"`
    63  }
    64  
    65  // Validate validates this patient
    66  func (m *Patient) Validate(formats strfmt.Registry) error {
    67  	var res []error
    68  	if len(res) > 0 {
    69  		return errors.CompositeValidationError(res...)
    70  	}
    71  	return nil
    72  }
    73  
    74  // MarshalBinary interface implementation
    75  func (m *Patient) MarshalBinary() ([]byte, error) {
    76  	if m == nil {
    77  		return nil, nil
    78  	}
    79  	return swag.WriteJSON(m)
    80  }
    81  
    82  // UnmarshalBinary interface implementation
    83  func (m *Patient) UnmarshalBinary(b []byte) error {
    84  	var res Patient
    85  	if err := swag.ReadJSON(b, &res); err != nil {
    86  		return err
    87  	}
    88  	*m = res
    89  	return nil
    90  }