-
Notifications
You must be signed in to change notification settings - Fork 2
#77 ptd structure data v2 #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: TemplateV2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fairly certain you can also remove this. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Auto detect text files and perform LF normalization | ||
| * text=auto |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can definitely remove this. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| name: CAPA | ||
| about: File a corrective action or preventative action (CAPA) report | ||
| title: "[CAPA]: " | ||
| labels: '' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| *This template is used to file a corrective action or preventative action (CAPA) report as specified by [CSC-QMS: SOP-016](https://github.com/GSTT-CSC/CSC-QMS)* | ||
|
|
||
| *Please complete all of the following fields* | ||
|
|
||
| **Type** | ||
| *Is this a corrective action or a preventative action? (delete as appropriate)* | ||
|
|
||
| Corrective/Preventative action | ||
|
|
||
| **Datix ID** | ||
| *If this CAPA has an associated Datix report, please enter the Datix ID here.* | ||
|
|
||
| **Description** | ||
| *Please describe the action. e.g., No contact details provided as part of product information* | ||
|
|
||
| **Immediate Actions** | ||
| *Describe any immeadiate actions needed to ensure safe control of the product/QMS process etc.* | ||
|
|
||
| **Root Cause** | ||
| *Please describe the root cause. e.g., Loss of information during development* | ||
|
|
||
| **Potentially Adverse Implications** | ||
| *Describe any potentially adverse implications to the action e.g., Release of product version and process update* | ||
|
|
||
| **Time Frame for Completion** | ||
| *Confirm the time frame within which the actions must be completed, confirmed by the QMO.* | ||
| *Consult CSC PR.014 for Incident Reporting timeframes* |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| name: Meeting Minutes | ||
| about: Log agenda and minutes | ||
| title: "[Minutes] - Weekly Meeting - DD-MM-YYYY" | ||
| labels: minutes | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Attendance/Apologies** | ||
|
|
||
| **Agenda** | ||
|
|
||
| **Actions** | ||
|
|
||
| - [ ] Action 1 | ||
| - [ ] Action 2 |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| name: Systematic Review | ||
| about: Log outcomes of systematic review of documentation at key project milestones | ||
| title: "[Systematic Review] - DD-MM-YYYY" | ||
| labels: minutes | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| ### Stakeholders | ||
|
|
||
| | Name | Role | | ||
| |------|------| | ||
| | | | | ||
|
|
||
| ### Project Milestone | ||
| > At which milestone is this review taking place? | ||
|
|
||
| Requirements / Proof of Concept / Deployment / Before Prospective Study / Clinical release / Other | ||
|
|
||
|
|
||
| ### Requirements Review | ||
|
|
||
| > Are requirements still adequate and non-conflicting? | ||
|
|
||
| ### Hazard log review - CRM | ||
|
|
||
| > Have any new hazards been identified? | ||
|
|
||
| ### Design specification review | ||
|
|
||
| > Have extra design spec items been identified? | ||
|
|
||
| ### Verification and validation review | ||
|
|
||
| > Have any unit tests or manual tests failed? | ||
|
|
||
| ### Outstanding issues | ||
|
|
||
|
|
||
| ### Resource issues |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| ### Linked Issue(s) | ||
| > Explicitly tag the issue linked to this pull request, if any. | ||
|
|
||
| ### Summary of changes | ||
| *Briefly describe the changes in this PR.* | ||
|
|
||
| ### Reason for changes | ||
| *Explain why these changes are being made* | ||
|
|
||
| <!-- Fill out the following section if this PR is related to a medical device. --> | ||
| <!-- Delete this section if your changes are not related to medical devices. --> | ||
| ### Clinical Risk Management Review | ||
| #### Summary of the clinical risk management review: | ||
| Briefly describe the outcome of the review and any actions taken. | ||
|
|
||
| #### Hazard Impact | ||
| **Related Hazards:** *Include references to the Hazard Log e.g. HZ-xxx, HZ-yyy* | ||
|
|
||
| **Impact on Hazards:** | ||
| - Mitigates: *List hazards it helps mitigate (e.g., HZ-xxx, HZ-yyy)*. | ||
| - Induces: *List hazards it might induce (e.g., HZ-xxx, HZ-yyy)*. | ||
|
|
||
| ## Quality Assurance | ||
| - [ ] Unit tests added |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| #!/bin/sh | ||
|
|
||
| # REGEX PATTERNS | ||
| FORBIDDEN_ADDRESS="^[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]([0-9ABEHMNPRV-Y])?)|[0-9][A-HJKPS-UW])?[[:space:]]?[0-9][ABD-HJLNP-UW-Z]{2}$" | ||
| FORBIDDEN_PATIENT_ID="^[a-zA-Z][0-9]{6}$|^[0-9]{7}[a-zA-Z]$" | ||
| FORBIDDEN_PHONE="(\+44|07)[0-9]{9}" | ||
| FORBIDDEN_ACCESSION_NUMBER="sp-[0-9]{2}-[0-9]{7}" | ||
| FORBIDDEN_DOB="[0-1][0-9]/[0-3][0-9]/[1-2][0-9]{3}" | ||
| FORBIDDEN_DATE_TIME="[0-1][0-9]/[0-3][0-9]/[1-2][0-9]{3}\s[0-2][0-9]:[0-5][0-9]:[0-5][0-9]" | ||
| FORBIDDEN_NHS="[0-9]{10}" | ||
|
|
||
| git_verification_patterns=( $FORBIDDEN_ADDRESS $FORBIDDEN_PATIENT_ID $FORBIDDEN_PHONE $FORBIDDEN_ACCESSION_NUMBER $FORBIDDEN_DATE_TIME $FORBIDDEN_DOB $FORBIDDEN_NHS) | ||
| git_verification_patterns_desc=("Address" "Patient ID" "Phone number" "Accession Number" "Date and Time" "Date of Birth" "NHS Number") | ||
|
|
||
| # Get modified files | ||
| FILES_MODIFIED=$(git diff --cached --name-only) | ||
|
|
||
| NUM_FILES_CHECKED=0 | ||
| NUM_FILES_OFFENCES=0 | ||
|
|
||
| # Exceptions | ||
| exception_file=".sensitive_exceptions" | ||
| exclusion_file=".files_exceptions" | ||
|
|
||
| echo "-- RUNNING SENSITIVE DATA CHECKS ----------------------------------------" | ||
|
|
||
| for F in $FILES_MODIFIED | ||
| do | ||
| F_basename=$(basename $F) | ||
| if grep -Fiq -- "$F_basename" $exclusion_file; then | ||
| continue | ||
| fi | ||
|
|
||
| for i in "${!git_verification_patterns[@]}"; do | ||
| MATCHES=$(egrep -i --line-number "${git_verification_patterns[$i]}" "$F" || true) | ||
|
|
||
| for MATCH in $MATCHES; do | ||
| IFS=':' read -ra PARTS <<< "$MATCH" | ||
| LINE_NUMBER=${PARTS[0]} | ||
| CONTENT=${PARTS[1]} | ||
|
|
||
| # Skip exceptions | ||
| if echo "$CONTENT" | grep -Fiq -f $exception_file; then | ||
| continue | ||
| fi | ||
|
|
||
| echo "FILE: $F" | ||
| echo " DESC: ${git_verification_patterns_desc[$i]}" | ||
| echo " MATCH: $MATCH" | ||
| echo " " | ||
|
|
||
| NUM_FILES_OFFENCES=$((NUM_FILES_OFFENCES+1)) | ||
| done | ||
| done | ||
|
|
||
| NUM_FILES_CHECKED=$((NUM_FILES_CHECKED+1)) | ||
| done | ||
|
|
||
| echo "-- SUMMARY --------------------------------------------------------------" | ||
| echo "" | ||
| echo " Files Checked: $NUM_FILES_CHECKED" | ||
| echo " Num File Offences: $NUM_FILES_OFFENCES" | ||
| if [ $NUM_FILES_OFFENCES -gt 0 ]; then | ||
| echo " Status: FAIL" | ||
| echo " " | ||
| else | ||
| echo " Status: OK" | ||
| echo " " | ||
| fi | ||
|
|
||
| if [ $NUM_FILES_OFFENCES -gt 0 ]; then | ||
| exit 1 | ||
| else | ||
| exit 0 | ||
| fi |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
|
||
| name: Development tests | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| env: | ||
| PROJECT_NAME: template # the project name | ||
| APPLICATION_DIR: project # the name of the main directory that contains the project code | ||
| TEST_DIR: tests # the name of the directory that contains the tests | ||
|
|
||
| jobs: | ||
|
|
||
| build-and-test: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Build and tag image | ||
| run: docker build -t $PROJECT_NAME:latest . | ||
|
|
||
| - name: Setup flake8 annotations | ||
| uses: rbialon/flake8-annotations@v1 | ||
|
|
||
| - name: Lint with flake8 | ||
| run: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| docker run --mount type=bind,source=$(pwd),target=/$APPLICATION_DIR $PROJECT_NAME flake8 /$APPLICATION_DIR --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| docker run --mount type=bind,source=$(pwd),target=/$APPLICATION_DIR $PROJECT_NAME flake8 /$APPLICATION_DIR --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
|
|
||
| - name: Test with pytest | ||
| run: | | ||
| coverage run -m --source=project pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=$APPLICATION_DIR $TEST_DIR/ | tee pytest-coverage.txt | ||
|
|
||
| - name: Pytest coverage comment | ||
| id: coverageComment | ||
| uses: MishaKav/pytest-coverage-comment@main | ||
| with: | ||
| pytest-coverage-path: ./pytest-coverage.txt | ||
| junitxml-path: ./pytest.xml |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
|
||
| name: Production tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| - 'master' | ||
| - 'release/*' | ||
|
|
||
| env: | ||
| PROJECT_NAME: template # the project name | ||
| APPLICATION_DIR: project # the name of the main directory that contains the project code | ||
| TEST_DIR: tests # the name of the directory that contains the tests | ||
| COV_GIST_BADGEID: COV_GIST_BADGEID # this github repo secret should define a gist token see https://github.com/Schneegans/dynamic-badges-action | ||
| COV_GIST_NAME: COV_GIST_NAME # this github repo secret should contain the filename of the gist see https://github.com/Schneegans/dynamic-badges-action | ||
|
|
||
| jobs: | ||
|
|
||
| build-and-test: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Build and tag image | ||
| run: docker build -t $PROJECT_NAME:latest . | ||
|
|
||
| - name: Setup flake8 annotations | ||
| uses: rbialon/flake8-annotations@v1 | ||
|
|
||
| - name: Lint with flake8 | ||
| run: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| docker run --mount type=bind,source=$(pwd),target=/$APPLICATION_DIR $PROJECT_NAME flake8 /$APPLICATION_DIR --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| docker run --mount type=bind,source=$(pwd),target=/$APPLICATION_DIR $PROJECT_NAME flake8 /$APPLICATION_DIR --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
|
|
||
| - name: Test with pytest | ||
| run: | | ||
| coverage run -m --source=project pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=$APPLICATION_DIR $TEST_DIR/ | tee pytest-coverage.txt | ||
|
|
||
| - name: Pytest coverage comment | ||
| id: coverageComment | ||
| uses: MishaKav/pytest-coverage-comment@main | ||
| with: | ||
| pytest-coverage-path: ./pytest-coverage.txt | ||
| junitxml-path: ./pytest.xml | ||
|
|
||
| - name: Create coverage Badge | ||
| uses: schneegans/dynamic-badges-action@v1.0.0 | ||
| with: | ||
| auth: ${{ secrets.PYTEST_COVERAGE_COMMENT }} | ||
| gistID: COV_GIST_BADGEID | ||
| filename: $COV_GIST_NAME | ||
| label: Test coverage | ||
| message: ${{ steps.coverageComment.outputs.coverage }} | ||
| color: ${{ steps.coverageComment.outputs.color }} | ||
| namedLogo: python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fairly certain you can remove this.