~intrahealth+informatics/ihris-common/4.3-dev

« back to all changes in this revision

Viewing changes to modules/FHIR/lib/FHIR_DSTU_TWO/PHPFHIRResponseParser.php

  • Committer: Carl Leitner
  • Date: 2016-07-09 16:29:01 UTC
  • mto: This revision was merged to the branch mainline in revision 1454.
  • Revision ID: litlfred@ibiblio.org-20160709162901-bfr3cv3vseb7dfw4
added fhir questionnaire -> form code.   added base fhir helper classes:

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
    private function _parseJson($input)
85
85
    {
86
86
        $decoded = json_decode($input, true);
87
 
 
88
87
        $lastError = json_last_error();
89
88
        if (JSON_ERROR_NONE === $lastError)
90
89
            return $this->_parseJsonObject($decoded, $decoded['resourceType']);
131
130
        $properties = $map['properties'];
132
131
 
133
132
        $object = new $fullClassName;
134
 
 
135
133
        // This indicates we are at a primitive value...
136
134
        if (is_scalar($jsonEntry))
137
135
        {
165
163
            {
166
164
                switch($k)
167
165
                {
168
 
                    'resourceType':
169
 
                    'fhir_comments':
 
166
                case 'resourceType':
 
167
                case 'fhir_comments':
170
168
                        continue 2;
171
169
                }
172
170
 
286
284
     */
287
285
    private function _triggerPropertyNotFoundError($fhirElementName, $propertyName)
288
286
    {
 
287
        debug_backtrace() ;
289
288
        return trigger_error(sprintf(
290
289
            'Could not find mapped property called "%s" on object "%s".  This could indicate malformed response or bug in class generator.',
291
290
            $propertyName,