117 lines
2.6 KiB
Common Lisp
117 lines
2.6 KiB
Common Lisp
(defclass health-form ()
|
|
((first-name
|
|
:initarg :first-name
|
|
:accessor first-name
|
|
:type string)
|
|
(last-name
|
|
:initarg :last-name
|
|
:accessor last-name
|
|
:type string)
|
|
(parent-first-name
|
|
:initarg :parent-first-name
|
|
:accessor parent-first-name
|
|
:type string)
|
|
(parent-last-name
|
|
:initarg :parent-last-name
|
|
:accessor parent-last-name
|
|
:type string)
|
|
(birth-date
|
|
:initarg :birth-date
|
|
:accessor birth-date
|
|
:type string)
|
|
(street
|
|
:initarg :street
|
|
:accessor street
|
|
:type string)
|
|
(city
|
|
:initarg :city
|
|
:accessor city
|
|
:type string)
|
|
(state
|
|
:initarg :state
|
|
:accessor state
|
|
:type string)
|
|
(zip
|
|
:initarg :zip
|
|
:accessor zip
|
|
:type string)
|
|
(cell-phone
|
|
:initarg :cell-phone
|
|
:accessor cell-phone
|
|
:type string)
|
|
(home-phone
|
|
:initarg :home-phone
|
|
:accessor home-phone
|
|
:type string)
|
|
(additional-emergency-contact
|
|
:initarg :additional-emergency-contact
|
|
:accessor additional-emergency-contact
|
|
:type string)
|
|
(doctor-name
|
|
:initarg :doctor-name
|
|
:accessor doctor-name
|
|
:type string)
|
|
(doctor-city
|
|
:initarg :doctor-city
|
|
:accessor doctor-city
|
|
:type string)
|
|
(doctor-phone
|
|
:initarg :doctor-phone
|
|
:accessor doctor-phone
|
|
:type string)
|
|
(medical-coverage
|
|
:initarg :medical-coverage
|
|
:accessor medical-coverage
|
|
:type string)
|
|
(insurance-name
|
|
:initarg :insurance-name
|
|
:accessor insurance-name
|
|
:type string)
|
|
(policy-number
|
|
:initarg :policy-number
|
|
:accessor policy-number
|
|
:type string)
|
|
(agreement
|
|
:initarg :agreement
|
|
:accessor agreement
|
|
:type string)
|
|
(allergies
|
|
:initarg :allergies
|
|
:accessor allergies
|
|
:type string)
|
|
(specific-allergies
|
|
:initarg :specific-allergies
|
|
:accessor specific-allergies
|
|
:type string)
|
|
(allergic-treatment
|
|
:initarg :allergic-treatment
|
|
:accessor allergic-treatment
|
|
:type string)
|
|
(conditions
|
|
:initarg :conditions
|
|
:accessor conditions
|
|
:type string)
|
|
(tetanus-shot
|
|
:initarg :tetanus-shot
|
|
:accessor tetanus-shot
|
|
:type string)
|
|
(swimming-ability
|
|
:initarg :swimming-ability
|
|
:accessor swimming-ability
|
|
:type string)
|
|
(other-notes
|
|
:initarg :other-notes
|
|
:accessor other-notes
|
|
:type string)))
|
|
|
|
|
|
(defun get-form-value (key list)
|
|
"Takes the key and alist of an online form and returns the value from it"
|
|
(serapeum:trim-whitespace (cdr (assoc key list :test 'string=))))
|
|
|
|
(defmethod list-to-hf (list)
|
|
(:documentation "Takes an alist and casts it to a health-form")
|
|
(make-instance 'health-form :first-name (get-form-value "first-name" list)))
|
|
|
|
|