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

« back to all changes in this revision

Viewing changes to modules/FHIR/modules/Questionnaire/lib/I2CE_FHIR_QuestionnaireResponse.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:
 
1
<?php
 
2
/**
 
3
* © Copyright 2016 IntraHealth International, Inc.
 
4
 
5
* This File is part of I2CE 
 
6
 
7
* I2CE is free software; you can redistribute it and/or modify 
 
8
* it under the terms of the GNU General Public License as published by 
 
9
* the Free Software Foundation; either version 3 of the License, or
 
10
* (at your option) any later version.
 
11
 
12
* This program is distributed in the hope that it will be useful, 
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of 
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 
15
* GNU General Public License for more details.
 
16
 
17
* You should have received a copy of the GNU General Public License 
 
18
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
* @package ihris-common
 
20
* @subpackage FHIR
 
21
* @author Carl Leitner <litlfred@ibiblio.org>
 
22
* @version v4.2.1
 
23
* @since v4.2.1
 
24
* @filesource 
 
25
*/ 
 
26
/** 
 
27
* Class I2CE_QuestionnaireResponse
 
28
 
29
* @access public
 
30
*/
 
31
 
 
32
use FHIR_DSTU_TWO\FHIRDomainResource\FHIRQuestionnaireResponse as FHIRQuestionnaireResponse;
 
33
use FHIR_DSTU_TWO\FHIRResource\FHIRBundle as FHIRBundle;
 
34
use FHIR_DSTU_TWO\PHPFHIRResponseParser as PHPFHIRResponseParser;
 
35
 
 
36
class I2CE_FHIR_QuestionnaireResponse {
 
37
 
 
38
 
 
39
    /**
 
40
     * Loads a questionniare resource from a content string     
 
41
     *
 
42
     * @param string $conent the contnet of the resource.
 
43
     * @return \FHIR_DSTU_TWO\FHIRQuestionnaire on success
 
44
     */
 
45
    public function load_resource_content($content) {
 
46
        parent::load_resource_content($content);
 
47
        if (! $this->resource instanceof  FHIRQuestionnaireReposne) {
 
48
            throw new Exception("Did not get a DSTU2 QuestionnaireReposnse resource");
 
49
        }
 
50
        return $this->resource;
 
51
    }
 
52
 
 
53
}
 
54
# Local Variables:
 
55
# mode: php
 
56
# c-default-style: "bsd"
 
57
# indent-tabs-mode: nil
 
58
# c-basic-offset: 4
 
59
# End: