   @constructs
   ###
   constructor: (@json) ->
+
   ###*
   @returns {String} containing M or F representing the gender of the patient
   ###
   gender: -> @json['gender']
+
+  ###*
+  @returns {String} containing the patient's given name
+  ###
   given: -> @json['first']
   family: -> @json['last']
 

      codedValues.push new CodedValue code, codeSystem
  codedValues

class Encounter
  constructor: (@json) ->
  date: -> dateFromUtcSeconds: @json['time']
  type: -> createCodedValues @json['codes']
  freeTextType: -> @json['description']

###*

###*
Converts a a number in UTS Seconds since the epoch to a date.
@param {number} utcSeconds seconds since the epoch in UTC
@returns {Date}
###
dateFromUtcSeconds = (utcSeconds) ->
  new Date utcSeconds * 1000

###*
@class A code with its corresponding code system
###
class CodedValue
  ###*
  @param {String} code value of the code
  @param {String} codeSystemName name of the code system that the code belongs to
  @constructs
  ###
  constructor: (@code, @codeSystemName) ->
  code: -> @code
  codeSystemName: -> @codeSystemName

###*
@private
###
createCodedValues = (jsonCodes) ->
  codedValues = []
  for codeSystem, codes of jsonCodes
