Skip to content

Commit

Permalink
Fixed json parse and -d command errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elsaperelli committed Mar 11, 2024
1 parent e8758f2 commit d0fc8ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data-requirements/compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if [ ! -d "elm-parser-for-ecqms" ]; then
git checkout "fhir_review"
ruby parse_elm.rb --bundle qicore
cd ..
if [-d "elm-parser-dr"]; then
if [ -d "elm-parser-dr" ]; then
rm -rf elm-parser-dr
fi
mkdir elm-parser-dr
Expand Down
11 changes: 7 additions & 4 deletions data-requirements/fqm-e-dr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ async function main() {
fs.mkdirSync('./fqm-e-dr');

// get all of the file names (short and fullPath) from the jan-2024-connectathon directory
const allBundles = fs.readdirSync(JAN_2024_CONNECTATHON_BASE_PATH).map(f => ({
shortName: f.split('v')[0],
fullPath: path.join(JAN_2024_CONNECTATHON_BASE_PATH, f)
}));
const allBundles = fs
.readdirSync(JAN_2024_CONNECTATHON_BASE_PATH)
.filter(f => f !== '.gitkeep')
.map(f => ({
shortName: f.split('v')[0],
fullPath: path.join(JAN_2024_CONNECTATHON_BASE_PATH, f)
}));

for (const bundle of allBundles) {
const measureBundle = JSON.parse(fs.readFileSync(bundle.fullPath, 'utf8')) as fhir4.Bundle;
Expand Down
4 changes: 2 additions & 2 deletions data-requirements/summary-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ echo "Gathering data-requirements output from the fhir_review branch of elm-pars

# Clone the elm-parser-for-ecqms in the data-requirements directory if it hasn't been, swtich to the fhir_review branch,
# run parse_elm.rb with --bundle qicore to get data-requirements for measure bundles from the January 2024 Connectathon
if [ ! -d "elm-parser-for-ecqms" ]; then
if [ ! -d "data-requirements/elm-parser-for-ecqms" ]; then
git clone https://github.com/projecttacoma/elm-parser-for-ecqms.git
git fetch --all
cd elm-parser-for-ecqms
git checkout "fhir_review"
ruby parse_elm.rb --bundle qicore
cd ..
if [-d "elm-parser-dr"]; then
if [ -d "elm-parser-dr" ]; then
rm -rf elm-parser-dr
fi
mkdir elm-parser-dr
Expand Down

0 comments on commit d0fc8ca

Please sign in to comment.