#!/bin/bash
#required files to be present in the directory
#   ProcFix.py
#   CodesAppendixG.txt
#    FunctionProcessProblemSection
#    FixMeasuresSection.sh
#    FixQRDAFewReadsVer19.sh
#    MEASURES-BY-PATIENT.txt
#    AllEncounterCodes.txt
#   EndDocumentationOfSectionNancy.txt
#    MatthewsProviderOranization.txt
#   NancysProviderOranization.txt


bash FixMeasuresSection.sh
rm -rf FilesWithoutEncounters.txt
bash FixQRDAFewReadsVer19.sh
rm -rf ErrorsProgressFunction
source FunctionProcessProblemSection
for i in $(ls -1 PAT_*Ver2.xml); do FunctionProcessProblemSection $i;done
for i in $(ls -1 PAT_*Ver2.xml); do python ProcFix.py CodesAppendixG.txt $i ;done
cat FilesWithoutEncounters.txt
bash RemoveProblemSectionIfNoProblemsLeft.sh