<?php

require_once $root_path . 'include/inc_environment_global.php';
include_once $root_path . 'include/care_api_classes/class_prescription.php';
if (!isset($pres_obj)) {
    $pres_obj = new Prescription();
}
$app_types = $pres_obj->getAppTypes();
$pres_types = $pres_obj->getPrescriptionTypes();
require_once $root_path . 'include/care_api_classes/class_person.php';
$person_obj = new Person();
if (empty($encounter_nr) and !empty($pid)) {
    $encounter_nr = $person_obj->CurrentEncounter($pid);
}
$debug = FALSE;
if ($debug) {
    if (!empty($back_path)) {
        $backpath = $back_path;
    }
    echo "file: show_prescription<br>";
    if (!isset($externalcall)) {
        echo "internal call<br>";
    } else {
        echo "external call<br>";
    }
    echo "mode=" . $mode . "<br>";
    echo "show=" . $show . "<br>";
    echo "nr=" . $nr . "<br>";
    echo "breakfile: " . $breakfile . "<br>";
    echo "backpath: " . $backpath . "<br>";
    echo "pid:" . $pid . "<br>";