Exemple #1
0
def request_dicom_files(input_file, output_file = None):
     results = subprocess.check_output("dicom_tools/retrieve.sh %s@%s:%d %s" % (STAGE_AE, 
         STAGE_HOST, STAGE_PORT, input_file), stderr=subprocess.STDOUT, shell=True)
     f = open(os.path.sep.join([run_dir, "pull_output.txt"]), "w")
     f.write(results)
     f.close()
     overview.write("Received %d files containing %d studies\n" % dicom_count(os.path.sep.join([run_dir, "from_staging"])))
     overview.flush()
     os.fsync(overview.fileno())
Exemple #2
0
def request_dicom_files(input_file, output_file=None):
    results = subprocess.check_output(
        "dicom_tools/retrieve.sh %s@%s:%d %s" %
        (STAGE_AE, STAGE_HOST, STAGE_PORT, input_file),
        stderr=subprocess.STDOUT,
        shell=True)
    f = open(os.path.sep.join([run_dir, "pull_output.txt"]), "w")
    f.write(results)
    f.close()
    overview.write("Received %d files containing %d studies\n" %
                   dicom_count(os.path.sep.join([run_dir, "from_staging"])))
    overview.flush()
    os.fsync(overview.fileno())
Exemple #3
0
def associate_to_existing_studies(run_dir, overview, practice):
    additional = ""
    if practice:
        additional = " -p"
    results = subprocess.check_output(
        "python loadstudies.py%s -i identity.db -f %s -d %s" %
        (additional, os.path.sep.join([run_dir, "no_encounter"]),
         os.path.sep.join([run_dir, "to_production"])),
        stderr=subprocess.STDOUT,
        shell=True)
    overview.write(
        "%d files containing %d studies were successfully hooked up to an encounter.\n"
        % dicom_count(os.path.sep.join([run_dir, "to_production"])))
    return results
Exemple #4
0
def associate_to_existing_studies(run_dir, overview, practice):
    additional = ""
    if practice:
        additional = " -p"
    results = subprocess.check_output("python loadstudies.py%s -i identity.db -f %s -d %s" % (additional, os.path.sep.join([run_dir,"no_encounter"]), os.path.sep.join([run_dir, "to_production"])),
        stderr=subprocess.STDOUT, shell=True)
    overview.write("%d files containing %d studies were successfully hooked up to an encounter.\n" % dicom_count(os.path.sep.join([run_dir, "to_production"])))
    return results